我尝试使用谷歌分析,这使我更新了adt和play服务库,以获得包含analytics4的最新版本。在此之后,我可以构建ptoject,我得到以下错误和警告
[2014-10-03 01:48:47 - Dex Loader] Unable to execute dex: method ID not in [0, 0xffff]: 65536
[2014-10-03 01:48:47 - chatter] Conversion to Dalvik format failed: Unable to execute dex: method ID not in [0, 0xffff]: 65536
[2014-10-03 01:48:34 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$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-10-03 01:48:34 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$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-10-03 01:48:34 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$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-10-03 01:48:34 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$4) 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-10-03 01:48:34 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$5) 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-10-03 01:48:34 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$6) 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-10-03 01:48:34 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.impl.LogFactoryImpl$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-10-03 01:48:34 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.impl.LogFactoryImpl$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-10-03 01:48:34 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.impl.LogFactoryImpl$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-10-03 01:48:34 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.impl.SimpleLog$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-10-03 01:48:34 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.impl.WeakHashtable$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-10-03 01:48:39 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.amazonaws.javax.xml.stream.StaxErrorReporter$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-10-03 01:48:39 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.amazonaws.javax.xml.stream.XMLReaderImpl$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-10-03 01:48:40 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.amazonaws.javax.xml.stream.xerces.util.SecuritySupport12$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-10-03 01:48:40 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.amazonaws.javax.xml.stream.xerces.util.SecuritySupport12$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-10-03 01:48:40 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.amazonaws.javax.xml.stream.xerces.util.SecuritySupport12$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-10-03 01:48:40 - chatter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.amazonaws.javax.xml.stream.xerces.util.SecuritySupport12$4) 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.
答案 0 :(得分:4)
正确答案描述为here
快速: 1-使用android studio 2-在Android studio中启用multi-dex
答案 1 :(得分:0)
[2014-10-03 01:48:47 - Dex Loader] Unable to execute dex: method ID not in [0, 0xffff]: 65536
[2014-10-03 01:48:47 - chatter] Conversion to Dalvik format failed: Unable to execute dex: method ID not in [0, 0xffff]: 65536
您已达到64K DEX方法参考限制。简而言之,您的应用程序太大了。您需要删除一些库,或者仅在创建调试版本时尝试应用ProGuard进行收缩,或者将应用程序拆分为多个DEX文件。
例如,如果您使用Play Services SDK的唯一原因是用于分析,那么您可能会考虑使用具有较小客户端库的其他分析服务,因为Play Services SDK非常庞大。
另见:
答案 2 :(得分:0)
按照本文指南修复问题: https://medium.com/@rotxed/dex-skys-the-limit-no-65k-methods-is-28e6cb40cf71
我使用了这个脚本,https://gist.github.com/dextorer/a32cad7819b7f272239b
如果您使用的是Windows,要运行sh命令,请使用cygwin shell。打开它,运行.bat文件并运行命令。
修复" \ r"在Windows中的文件编码问题,在记事本++中打开它,然后从编辑菜单,选择EOL转换> UNIX格式