我建立我的应用程序我得到了这个错误
Dx警告:忽略没有关联的EnclosingMethod属性的匿名内部类(com.amazonaws.javax.xml.stream.xerces.util.SecuritySupport12 $ 4)的InnerClasses属性.这个类可能是由一个没有以现代.class文件格式为目标的编译器生成的.建议的解决方案是使用最新的编译器从源代码重新编译类,而不指定任何"-target"类型选项.忽略此警告的后果是,对此类的反射操作将错误地指示它不是内部类.
Dex Loader]无法执行dex:方法ID不在[0,0xffff]中:65536转换为Dalvik格式失败:无法执行dex:方法ID不在[0,0xffff]中:65536
检查构建路径 - > Java Build Path - > Order and Export选项卡 - >取消选中Android private Librairies.
如果仍然无法正常工作,请将以下行添加 dex.force.jumbo=true
到project.properties
文件中.
可能的原因可能是构建路径中的大型jar.
编辑: 这是不推荐使用的,因为谷歌不再支持Eclipse,如果您想摆脱这些恼人的问题:使用Android Studio并启用Multidex.
Driss Bounouar解决方案实际上可以帮助您构建项目,但是在实现它之后,您的应用程序可能会在某些地方崩溃,我认为它实际上会在编译时抑制该问题.
我在控制台遇到的错误是: -
Dex Loader] Unable to execute dex: method ID not in [0, 0xffff]: 65536 Conversion to Dalvik format failed: Unable to execute dex: method ID not in [0, 0xffff]: 65536 [2014-11-08 15:51:58 - MLBPA] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class (jnamed$1) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is *not* an inner class. [2014-11-08 15:51:58 - MLBPA] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class (jnamed$2) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is *not* an inner class. [2014-11-08 15:51:58 - MLBPA] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class (jnamed$3) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is *not* an inner class. [2014-11-08 15:51:59 - MLBPA] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class (org.xbill.DNS.UDPClient$1) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is *not* an inner class.
根据这个跟踪,我曾尝试使用相同和最新的编译器重新编译我的所有项目但仍然没有取得任何成功.
后来更换最新的 谷歌Play业务与旧的一个固定我的问题.
我在几个小时之前更新了我的Google Play服务,并在之后开始收到此错误.
编辑
要了解实际问题,您应该看看使用超过65K方法构建应用程序在我们的情况下,看起来旧版Google Play服务的方法数量较少,因此项目已成功编译.
简要
我们整个项目被编译成一个dex文件,限制为65K方法.但现在您可以在项目中启用multidex文件.到目前为止可用的解决方案仅适用于GRADLE(Android Studio),我还没有找到任何方法使它在Eclipse上运行.
我刚刚在使用Google Play服务时找到了在Eclipse上解决此问题的替代方法.因为在Eclipse上似乎没有办法像在Android Studio(和Gradle)中那样使用multidex,这似乎是现在使用Eclipse rigth的唯一方法.
进入google-play-service-lib项目
进入图书馆
解压缩文件google-play-services.jar
进入解压缩文件夹并删除所有不需要的文件夹(即如果您需要Google Analytics,则可以删除广告,游戏,地图,钱包,广告等)
再次压缩这样一个文件夹(现在只包含所需的库)和MANIFEST文件夹
在你的项目中使用这样的新jar.