当我从Android Studio 2预览4升级到预览版6时,我的应用会构建,但在设备上启动时会立即崩溃。我的应用程序使用谷歌地图和播放服务,并在升级之前成功构建。
禁用即时运行可让我构建而不会崩溃,但如果禁用即时运行,则无法使用Studio 2.0测试版。
我尝试回到预览4,问题仍然存在。似乎问题的根源在于使用
classpath 'com.android.tools.build:gradle:2.0.0-alpha6'
当我强制它使用alpha3(我以前的工作设置)时,一切都很好,即时运行按预期工作室预览4和6工作:
classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
应用启动/崩溃时的异常是:
01-21 17:35:31.555 30075-30075 / com.company.myappnameplus E / AndroidRuntime:FATAL EXCEPTION:主要流程: com.company.myappnameplus,PID:30075 java.lang.RuntimeException: 无法实例化应用程序 com.android.tools.fd.runtime.BootstrapApplication: java.lang.ClassNotFoundException:没找到类 " com.android.tools.fd.runtime.BootstrapApplication"在路径上: DexPathList [[zip file" /system/framework/com.google.android.maps.jar", zip文件" /data/app/com.company.myappnameplus-1/base.apk" ;,zip文件 " /data/app/com.company.myappnameplus-1/split_lib_dependencies_8b36bf2fb6c9fc3dcd915b0effe791e5a50faf8d.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_0_1a0168c89c1a86b61600aa66f7d6f319881b77c4.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_1_a471c1e8faba5d17663780e37b7f227a45f3bc48.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_2_9dc8d6131a401b2484dca13c95c2bfff6ce9fe24.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_3_489c8b6bf579c4a0b5a7968fa43d579b9fbf0ea1.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_4_0e650edd3ae479f251ae5a4b5a1bf84498771472.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_5_95fd91377416b71171b9b62c4c6559534d10668d.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_6_a24f63d8736d4696a2261fd6310aca5decd2e753.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_7_bc927a3c249d78a3bed63d615fee2368a584d167.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_8_3930d0a866d3a4c4384dc1c0b3d6baa5c310bed1.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_9_20ea2f37b2bb23f478a650eb82cd0465187969d4.apk"],nativeLibraryDirectories = [/数据/应用/ com.company.myappnameplus-1 / LIB / arm64, / vendor / lib64,/ system / lib64]] android.app.LoadedApk.makeApplication(LoadedApk.java:578)at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4680) 在android.app.ActivityThread.-wrap1(ActivityThread.java)处 android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1405) 在android.os.Handler.dispatchMessage(Handler.java:102)at android.os.Looper.loop(Looper.java:148)at android.app.ActivityThread.main(ActivityThread.java:5417)at java.lang.reflect.Method.invoke(Native Method)at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:726) 在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)引起 by:java.lang.ClassNotFoundException:没找到类 " com.android.tools.fd.runtime.BootstrapApplication"在路径上: DexPathList [[zip file" /system/framework/com.google.android.maps.jar", zip文件" /data/app/com.company.myappnameplus-1/base.apk" ;,zip文件 " /data/app/com.company.myappnameplus-1/split_lib_dependencies_8b36bf2fb6c9fc3dcd915b0effe791e5a50faf8d.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_0_1a0168c89c1a86b61600aa66f7d6f319881b77c4.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_1_a471c1e8faba5d17663780e37b7f227a45f3bc48.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_2_9dc8d6131a401b2484dca13c95c2bfff6ce9fe24.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_3_489c8b6bf579c4a0b5a7968fa43d579b9fbf0ea1.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_4_0e650edd3ae479f251ae5a4b5a1bf84498771472.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_5_95fd91377416b71171b9b62c4c6559534d10668d.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_6_a24f63d8736d4696a2261fd6310aca5decd2e753.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_7_bc927a3c249d78a3bed63d615fee2368a584d167.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_8_3930d0a866d3a4c4384dc1c0b3d6baa5c310bed1.apk" ;, zip文件 " /data/app/com.company.myappnameplus-1/split_lib_slice_9_20ea2f37b2bb23f478a650eb82cd0465187969d4.apk"],nativeLibraryDirectories = [/数据/应用/ com.company.myappnameplus-1 / LIB / arm64, / vendor / lib64,/ system / lib64]]
有谁知道发生了什么或如何克服这个错误?