问题
My application taking so much time to launching First Activity screen. It will showing white screen for long time. Even after kill my application and accessing.
I am using Java 8 and Android Studio 2.1.1, Gradle version as com.android.tools.build:gradle:2.1.0
回答1:
The Instant Run is enabled in your Android Studio. Try to disable the function. You will not get that issue.
Why does my App start incredibly slow (10s+) at first run, showing only white screen on android 5.0?
回答2:
check this In android studio --> File --> Setting --> Build --> Remove tick following option's
回答3:
if you are launching application to the first time it take time to load, after that when you open it second time it not take time to open.
You are using debug_apk. try creating release sign apk once and check it take time or not.
回答4:
If you have an image which shows in splash screen and if there is only single density image, put it in drawable-xxxhdpi folder.
回答5:
In my experience, Fabric consumes a bit of time in establishing the connection and communicating.
I would suggest you to comment the Fabric portion on the code and re-run to see if there is any change in the app load time.
Additionally u could move the code on to an async task rather than performing these on the main thread. It would at least not slow down ur initial app launch time.
来源:https://stackoverflow.com/questions/37496625/my-application-taking-so-much-time-to-launching-first-activity-screen