在Android Studio 运行的时候报dalvikvm: Could not find class 'xxx',
2017-09-12 19:05
489 查看
转自 http://blog.csdn.net/u011005173/article/details/52232221
问题描述:
在Android Studio 运行的时候报E/dalvikvm: Could not find class ‘xxx’,
但是在android5.0以上不会报此错误能运行成功。
解决办法:
在app->build.gradle 中有如下设置
其中
minifyEnabled false 意思是 是否进行混淆
我们只需要在自己工程中的Application中加入下面代码即可解决。
问题描述:
在Android Studio 运行的时候报E/dalvikvm: Could not find class ‘xxx’,
但是在android5.0以上不会报此错误能运行成功。
解决办法:
在app->build.gradle 中有如下设置
buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }
其中
minifyEnabled false 意思是 是否进行混淆
我们只需要在自己工程中的Application中加入下面代码即可解决。
@Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this); }
相关文章推荐
- 在Android Studio 运行的时候报E/dalvikvm: Could not find class 'xxx',
- 在Android Studio 运行的时候报E/dalvikvm: Could not find class 'xxx',
- 在Android Studio 运行的时候报E/dalvikvm: Could not find class 'xxx',
- Android运行时候报错 E/dalvikvm: Could not find class.....
- Myeclips运行的的时候出现Could not find the main class:Main. Program will exit.
- 运行maven项目出现:Error: Could not find or load main class com.xxx.xxxx
- Android Studio各种坑爹之:dalvikvm: Could not find class 'android.util.ArrayMap'
- 在centos中运行java命令时出现Error: Could not find or load main class XXX问题的解决方法
- Ubuntu 下 Error: Could not find or load main class xxx(2017/05/27)
- Android E/dalvikvm: Could not find class ****** referenced from 错误
- 运行jar文件时,出现“could not find the main class”的解决方法
- Could not find a method XXX(View) in the activity class
- [已解决问题] Could not find class XXX referenced from method XXX.<YYY>
- 【hadoop sqoop】运行sqoop 报 Could not find or load main class org.apache.sqoop.Sqoop
- 只有被测APK时运行Robotium测试项目Logcat报错“Could not find class 'com.jayway.android.robotium.solo.Solo'"
- AChartEnginee Could not find class 'org.achartengine.chart.PointStyle[]', referenced from method xxx
- E/dalvikvm: Could not find class
- 随记(三)--Xcode故事板拖拉时,could not insert new outlet connection :Could not find any information for the class named "xxx".
- 关于JNI配置Error: Could not find class file for 'XXX'问题(MAC Andriod Studio)
- java调用本地方法的时候报错 could not find the main class:xx.program will exit