NoClassDefFoundError with Android Studio on Android 4
2015-12-10 17:20
483 查看
I was incompletely implementing MultiDex support, so some of my classes weren’t in the proper dex file. To fix it, you have to do more than just set multiDexEnabled = true in your defaultConfig block. You also have to:
Include compile ‘com.android.support:multidex:1.0.0’ in your dependencies
Have your Application class extend MultiDexApplication instead of just Application. Alternatively, you can call MultiDex.install() in attachBaseContext() of your application.
See https://developer.android.com/tools/building/multidex.html for more details.
Include compile ‘com.android.support:multidex:1.0.0’ in your dependencies
Have your Application class extend MultiDexApplication instead of just Application. Alternatively, you can call MultiDex.install() in attachBaseContext() of your application.
See https://developer.android.com/tools/building/multidex.html for more details.
Minimal MultiDex capable application. To use the legacy multidex library there is 3 possibility: Declare this class as the application in your AndroidManifest.xml. Have your Application extends this class. Have your Application override attachBaseContext starting with protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this);
相关文章推荐
- android内嵌页中使用<img>后面的图片是一大串数据流形式显示
- Android Studio打包Signed APK 碰到的一个Error
- Android Handler Message总结一下
- 关于androidStudio使用多渠道打包
- Android自定义XML文件
- 每个 Android 开发者必须知道的资源集锦
- Android事件
- 基于Jenkins+git+gradle的android持续集成,jenkinsgradle
- Android AlertDialog 设置setMultiChoiceItems(多选列表)
- Android小笔记(1)
- Android编程开发规范
- Android-两种方式实现走马灯效果
- Android开发,关于Intent跳转和传递值
- Android selector 失效
- Android的线程和线程池
- Android 界面编程
- Android Studio 1.5+ 配置Android Annotations框架
- Android:控件AutoCompleteTextView 客户端保存搜索历史自动提示
- Android开发笔记(十五)淡入淡出动画TransitionDrawable
- Android:控件Spinner实现下拉列表