Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dex loader unable to execute dex: method ID not in [0, 0xffff]: 65536

iam building my application i got this error

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.

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

like image 948
user3230564 Avatar asked Sep 19 '14 07:09

user3230564


1 Answers

Driss Bounouar solution actually help you in building up your project, but your application may crash at some places after implementing it, I think it actually suppresses the issue at compile time.

The errors I was getting at console were :-

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.

According to this Trace I had tried recompiling my all the projects with same and latest compiler but still I was not getting any success.

Later on replacing latest google Play services with the older one fixed my issue.

I had updated my google play services few hours before and started getting this error there after.

EDIT

To understand the actual problem you should look at Building Apps with Over 65K Methods In our situation it looks like old google Play services had lesser number of methods and hence the project was successfully compiling.

Brief

Our whole project is compiled into one dex file which has limit of 65K methods. But now you can enable multidex files in you project. The solution available so far will work only with GRADLE (Android Studio), I haven't found any way to make it work on Eclipse.

like image 75
DeltaCap019 Avatar answered Oct 10 '22 15:10

DeltaCap019