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

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

I encountered this problem when I updated Google play services in my Eclipse project. This error is due to too many methods included in the Google play services library.  You can safely take out those methods if you don't need them to not exceed the limit. This problem is much easier to work around in Android studio, but if moving to another IDE is not an option, you can try this workaround to reduce the method count of your project.

Removing unneeded Google services API

Google play services library includes the API of their  services like maps, plus, wear, games and etc.  In my case I only need Google ads API so I can safely remove them.

  1. Go to <some-path>google-play-services_lib\libs.
  2.  Open google-play-services.jar with any archiver like 7zip.
  3. Once you are inside the jar file navigate to \com\google\android\gms\ and delete services you don't need.  Enjoy!
About Mboy 26 Articles
I'm a lover and a good friend.. :)

Be the first to comment

Leave a Reply

Your email address will not be published.