Android app time delay on 5.0+ devices

2020-08-09 04:38发布

问题:

My app is taking 10-12 sec delay while first load on 5.0+ devices, 4.4 or below devices does not have this problem. I have added a log message in Application class onCreate method but it is also called after 10-12 sec seconds. I have tried multidex enable false, minify enabled true but does not make any difference. I have found one thing, when we clear cache and data from app info activity, then it again delay while loading and my app is taking around 10mb of cache and 5 mb of data which is higher than usual. How to address this problem? I have not find this type of issue on net or stackoverflow

回答1:

It happens when you enable Instant Run in Android Studio. Try disabling instant run and check. It happens only in debug builds