Conversion to Dalvik format failed: Unable to execute dex: method ID not in [0, 0xffff]: 65536
原因: Answer
The Dalvik VM can have a maximum of 65536 methods per dex file, due to a memory allocation issue.
While it is possible to fix this using multiple dex files, Facebook found another fix that they could deploy within their app to get around the problem.
由于在使用的过程中,我们把class.jar等第三方的jar放在了libs目录下,同时在user library目录下又存在第二份,重复包含很多接口,所以导致接口溢出。
如果项目扩展中,实际使用的接口超过了限制,可以采用如下方式尝试解决!
参见:http://androiddev.orkitra.com/?p=32706
http://android-developers.blogspot.co.il/2011/07/custom-class-loading-in-dalvik.html
本文探讨了解决Android应用中DEX文件方法数超过65536的问题。介绍了问题产生的原因,通常是因为第三方库重复引入导致。提供了解决方案,包括使用多个DEX文件和在应用内部实施的修复方法。
3157

被折叠的 条评论
为什么被折叠?



