转自 http://blog.csdn.net/u011005173/article/details/52232221

问题描述:
在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中加入下面代码即可解决。

@Overrideprotected void attachBaseContext(Context base) {    super.attachBaseContext(base);    MultiDex.install(this);}

更多相关文章

  1. 高通平台android串口没有输出
  2. Android(安卓)studio运行Main方法
  3. Android(安卓)应用第一次运行时,引导页面的设置方法(只让程序Aciti
  4. Dalvik——基本Dalvik VM调用
  5. 解决 Android(安卓)N requires the IDE to be running with Java
  6. 64位ubuntu16.04安装Android(安卓)Studio
  7. Android(安卓)EditText默认不弹出输入法,以及获取光标,修改输入法E
  8. 增加Android模拟器的内存
  9. Android(安卓)相关七种 CPU 架构适配

随机推荐

  1. 图文并茂的android之SpannableString
  2. 使用谷歌提供的支持库(Android)
  3. android之图像处理、缩放、修改图片、绘
  4. 在eclipse中查看android源码
  5. android设置Activity背景色为透明的3种方
  6. android Java开发设计模式及在android中
  7. Android中关于Volley的使用(一)加载图片
  8. Android 开发者的 Flutter(三) —— Flutte
  9. Android P 开发者预览版 · 操作指南
  10. Android(安卓)打开相册选择单张图片实现