apk安装报错

最近在公司导入一个项目总报一个错:

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.app.Application"

    java.lang.RuntimeException: Unable to instantiate application com.app.Application: java.lang.ClassNotFoundException: 
	Didn't find class "com.app.Application" on path: DexPathList[[zip file "/data/app/com.app-2/base.apk", zip file "/data/app/com.app-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.app-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.app-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.app-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.app-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.app-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.app-2/split_lib_slice_5_apk.apk"


然而项目中存在这个类。经过多次的测试,最终在百度上找到了一份解决方案:

dependencies { 
classpath ‘com.android.tools.build:gradle:2.3.1’ 
}
把这个换成小版本:
dependencies { 
classpath ‘com.android.tools.build:gradle:2.2.3’ 
}
apk安装报错_第1张图片
将Android Plugin Version 换成2.2.3,问题解决。

你可能感兴趣的:(Android学习之路,Android,apk,class,Exception)