Skip to content Skip to sidebar Skip to footer

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

Solution 1:

Check the build path -> Java Build Path -> Order and Export tab -> uncheck Android private Librairies.

If it is still not working, add the following line : dex.force.jumbo=true to the project.properties file.

The probable cause is maybe a big sized jar in build path.

Edit :This is deprecated because Eclipse is no longer supported by Google, if you wanna get rid of these annoying problems : use Android Studio and enable Multidex.

Solution 2:

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 notin [0, 0xffff]: 65536
Conversion to Dalvik format failed: Unable to execute dex: method ID notin [0, 0xffff]: 65536

[2014-11-0815: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 isto recompile the classfrom 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-0815: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 isto recompile the classfrom 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-0815: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 isto recompile the classfrom 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-0815: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 isto recompile the classfrom 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 latestgoogle 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.

Solution 3:

I just found an alternative to solve this issue on Eclipse when using Google Play Services. Because on Eclipse it seems that there is no way to use multidex as in Android Studio (and Gradle) this seems the only way to work on Eclipse rigth now.

  1. go in the google-play-service-lib project
  2. go in libs
  3. unzip the file google-play-services.jar
  4. go in the the unzipped folder and remove all folders that you don't need (i.e. if you need Analytics, you can remove ads, games, maps, wallet, drive, etc.)
  5. zip again such a folder (that now contains only the needed libraries) together with the MANIFEST folder
  6. use such new jar with your project.

Solution 4:

Expirienced same issue. Problem was in google-play-services_lib project. It includes to many functions. This issue is fixed in 21 and newer versions of google-play-services_lib.

To fix multi-dex problem you should remove old lib project completely and use google-play-services_lib_v_21 or newer instead.

For example i used this one: google-play-services.

P.S. Also keep in mind that official google play setup docs say:

You should be referencing a copy of the library that you copied to your development workspace — you should NOT reference the library directly from the Android SDK directory.

Solution 5:

I also had recently update the google play libs to version 29 and my app hit the 2^16 limit! I downgraded to version 26 that I knew it worked for me and indeed it has.

Developing with Eclipse seems to have become rather unstable now, so it is very advisable to keep track of all the versions of all packages installed!

The solution in the long term is to switch to Android Studio.

Post a Comment for "Dex Loader Unable To Execute Dex: Method Id Not In [0, 0xffff]: 65536"