0

My problem is that every time i used to launch my app for the very first time. It showed a white screen for at-least 40 secs which was obviously too long than i learned about APK Analyzer in android studio. So i used it and i saw that libs folder was taking 93% of total size so i tried to remove all non used libraries and checked . The size became 74% of total app and i also saw a decrease of 20 secs in launch time but 22 secs is still a lot. I don't know how to solve this. Even if i show splash screen 22 secs wait is still a lot. Sorry i am on other laptop so i can't show anything and i am just showing 2 buttons on startup so start screen can't be an issue. Can some one please help me solve this or atleast bring startup time to below 10 secs. Thank you :)

Syed Muhammad Oan
  • 687
  • 2
  • 15
  • 39

2 Answers2

2

Go to File -> Setting -> Build,Execution, Deployment-> Instant Run

uncheck the Enable instant run if it is checked, then run the project and let me know.

Arpit Patel
  • 1,561
  • 13
  • 23
  • thank you :) Worked. May i know the reason why? I mean see now that when i used to load first time the app the size in preference was already 9 mb without doing anything. But when i disable it the app data is only 172 kb – Syed Muhammad Oan Oct 27 '16 at 14:15
  • Please check the link https://developer.android.com/studio/run/index.html#instant-run. You will find all the reason why it is so.. "Although your first build may take longer to complete, Instant Run pushes subsequent updates to your app without building a new APK, so changes are visible much more quickly." – Arpit Patel Oct 28 '16 at 04:15
1

I faced same problem try disabling instant run. The setting can be accessed by going into

File > Setting > Build, Execution, Deployment > Instant Run

Uncheck the Checkbox, then re-build the project

kammy
  • 11
  • 3