65536 "DexIndexOverflowException"问题官方解决方案
来源:互联网 发布:美国阿富汗战争知乎 编辑:程序博客网 时间:2024/06/07 12:34
65536 “DexIndexOverflowException”问题官方解决方案
错误原因
android会将app内的所有类压缩到一个dex文件中,但是dex比较蛋疼的一点就是有一个方法数和大小限制,好像是2.3最大智能是5m左右吧。方法数不能超过65536。当我们使用的方法数超过这个限制值就可能会有问题出现。
处理方法
对dex进行拆分.
1、在build.gradle文件中加入依赖
dependencies{ ... compile 'com.android.support:multidex:' ...}
2、在defaultConfig中加入设置multiDexEnabled标签为true, 开启multi-dexing支持
defaultConfig{ ... multiDexEnabled true ...}
3、将你自己的application类继承自multiDexApplication
public class xxxApplication extends MultiDexApplication{}android:name="xxx..xxx..xxxApplication"
加入该操作之后出现build内存溢出处理
在android{} 模块中加入dexoptions
android { ... dexOptions{ javaMaxHeapSize "4g"} ...}
0 0
- 65536 "DexIndexOverflowException"问题官方解决方案
- dexindexoverflowException 65536 的问题
- DexIndexOverflowException--65536
- 关于MultiDex的一些问题65536 and DexIndexOverflowException
- 解决“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”问题
- 解决“com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536”问题
- 解决Android单个dex文件不能超过65536个方法问题,DexIndexOverflowException
- Android 工程方法数量65536 DexIndexOverflowException
- 方法数超过65536,DexIndexOverflowException的解决
- 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关于——com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536——问题
- Android Studio:64K问题com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
- android 架包依赖过多问题:com.android.dex.DexIndexOverflowException
- 方法数超过65536官方解决方案
- 【UNP】官方代码编译出现问题及解决方案
- useradd添加用户无法进入可视化界面
- android studio使用技巧
- Windows8下安装win7VHD deepinVHD
- 利用reflect设置struct的字段
- jquery之交付序列化表单(serialize)及乱码处理
- 65536 "DexIndexOverflowException"问题官方解决方案
- 欢迎使用CSDN-markdown编辑器
- 2522A simple problem
- Codeforces Round #337 (Div. 2) E. Alphabet Permutations (线段树lazy 或 set)
- XAML那些事儿
- 详细分析推荐系统和搜索引擎的差异陈运文
- 树
- 如何在CentOS 5/6上安装EPEL源
- IOS之Info.plist文件简介