3

I tried to user google analytics, this led me to updating the adt and play services library to get the latest version that contains analytics4. After this I could bit build the ptoject and I get the following errors and warning

[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.
MSaudi
  • 4,442
  • 2
  • 40
  • 65

3 Answers3

4

The correct answer is described here

In quick : 1- Use android studio 2- Enable multi-dex in Android studio

MSaudi
  • 4,442
  • 2
  • 40
  • 65
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

You have reached the 64K DEX method reference limit. In short, your app is too big. You will need to remove some libraries, or try to apply ProGuard for shrinking only when creating your debug builds, or look into splitting your app into multiple DEX files.

For example, if the only reason why you are using the Play Services SDK is for analytics, you might consider a different analytics service that has a smaller client-side library, as the Play Services SDK is huge.

See also:

Community
  • 1
  • 1
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • I will consider the custom class loading approach. Can we do this in eclipse ? integrate ant somehow in eclipse running options ? – MSaudi Oct 03 '14 at 00:40
  • @MSaudi: I know that the split DEX/custom class loading stuff has been done with Ant (and I presume Eclipse). I do not have any recipes handy for how to do it, though. – CommonsWare Oct 03 '14 at 10:22
  • I wish the output would show how many methods I am over 64K so that I could tell whether it's worth it to refactor. – Someone Somewhere Apr 01 '15 at 21:38
0

Issue fixed by following this article guide : https://medium.com/@rotxed/dex-skys-the-limit-no-65k-methods-is-28e6cb40cf71

I used this script , https://gist.github.com/dextorer/a32cad7819b7f272239b

If you are using Windows, to run the sh command, use cygwin shell. Open it, run the .bat file and run the command.

To fix the "\r" issue in the file encoding in windows, open it in notepad++, then from Edit Menu, Choose EOL Conversion > UNIX format

MSaudi
  • 4,442
  • 2
  • 40
  • 65