“com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536”问题解决
来源:互联网 发布:金窗教务系统源码 编辑:程序博客网 时间:2024/06/08 06:24
在工程中引入了多个第三方jar包,导致调用的方法数超过了android设定的65536个(DEX 64K problem),进而导致dex无法生成,也就无法生成APK文件。
解决办法如下:
1、在项目的build.gradle文件的dependencies 节中添加分包设置:
dependencies { ... compile 'com.android.support:multidex:1.0.0' ... }2、通过在defaultConfig节中设置multiDexEnabled标签为true,开启multi-dexing支持.
defaultConfig { ... multiDexEnabled true ... }
3、设置Application(三种情况)
(1)未创建Application,直接在AndroidManifest.xml文件的Application声明中添加
android:name="android.support.multidex.MultiDexApplication"(2)Application 继承 android.support.multidex.MultiDexApplication
(3)override attachBaseContext()方法
public class MyApplication extends FooApplication { @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this); } }
0 0
- “com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536”问题解决
- Android Studio 错误 com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
- Android 解决“com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536”问题
- Android解决“com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536”问题
- Android Studio 错误 com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
- Android Studio 错误 com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
- Android Studio——com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
- Android Studio 错误 com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
- Android studio打包错误com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
- (转)Android Studio 错误 com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
- 解决“com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536”问题
- 关于com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536的解决方法
- 解决“com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536”问题
- 解决com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
- 异常com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
- 错误ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
- 当android编译出现com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536错误时的处理
- Android学习笔记----解决“com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536”问题
- Spring事务配置的五种方式
- EL跟OGNL对比
- 如何在Solr中实现多core查询?
- leetcode -- Roman to Integer -- 简单偏题
- 【Android游戏开发十一】手把手让你爱上Android sdk自带“9妹”(9patch 工具),让Android游戏开发更方便!
- “com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536”问题解决
- 2015年12月8日日志
- Scala 文件读写及Scala控制台输入
- centos 6.5 修改yum源
- Intent和IntentFilter的区别
- IOS 通过麦克风检测声音分贝
- ios学习笔记(七)关于NSUInteger
- ScrollView嵌套ViewPager
- 【Android游戏开发十二】(保存游戏数据 [上文])详解SharedPreference 与 FIleInputStream/FileOutputStream将数据存储到SD卡中!