当我从Studio安装应用程序或通过复制到存储卡时。它第一次显示白色画面,然后工作normally.I注意到以下日志:第一次安装并出现白屏时延迟打开应用程序
I/dex2oat:dex2oat了27.579ms(线程:4)领域的alloc = 0B的Java 的alloc = 39KB本地ALLOC = 439KB free = 840KB I/dex2oat: /system/bin/dex2oat --debuggable --dex-file =/data/data/com.company.package/files/instant-run/dex/slice-slice_9-classes .dex --oat-file =/data/user/0com.company.package/cache/slice-slice_9-classes.dex
I/dex2oat:dex2oat花了223.751ms(线程:4)arena alloc = 3MB java alloc = 206KB native alloc = 5MB free = 5MB I/dex2oat:/ system/bin/dex2oat --debuggable -dex-file =/data/data/com.company.package/files/instant-run/dex/slice-slice_8-classes.dex --oat-file =/data/user/0/com.company.package/cache/slice-slice_8-classes.dex
I/dex2oat:dex2oat花了515.355ms(线程:4)arena alloc = 855KB java alloc = 315KB native alloc = 4MB free = 2MB I/dex2oat:/ system/bin/dex2oat --debuggable -dex-file =/data/data/com.company.package/files/instant-run/dex/slice-slice_7-classes.dex --oat-file =/data/user/0/com.company.package/cache/slice-slice_7-classes.dex
这下降了0(slice-slice_0-classes),然后我的启动画面启动。 这是任何内存问题,或者我在这里做错了。
依赖
依赖{
compile 'com.google.android.gms:play-services-plus:8.4.0'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-identity:8.4.0'
compile 'com.google.android.gms:play-services-analytics:8.4.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
//3rd party
compile 'com.viewpagerindicator:library:[email protected]'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
compile 'com.github.lzyzsd:circleprogress:[email protected]'
compile 'com.getbase:floatingactionbutton:1.10.1'
compile files('libs/pgsdk.jar')
compile files('libs/core.jar')
compile project(':commonslib')
compile project(':gcmlibrary')
compile project(':sdkui')
compile project(':PayU-release')
compile 'com.google.android.gms:play-services-appindexing:8.4.0'
}
你第一次尝试搜索您的build.gradle文件真实 ? http://stackoverflow.com/questions/36575229/android-studio-2-0-pause-white-screen-on-app-first-run –
你可以告诉我你的app的build.gradle文件它看起来像你使用超过65536的方法,这是第一次,它需要更多的时间 –
@HarshSharma我已经在问题中添加了所有依赖关系 –