0

Hello friends i want to integrate map in my application so i add google play service jar in my application but when i add this jar it give me error like

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

i attach my screnshots of my applicaiotn

enter image description here

my jar list n lib folder

enter image description here

my build path status enter image description here

my project.properties file code

target=android-18
android.library.reference.1=..\\appcompat_v7
android.library.reference.2=..\\google-play-services_lib

dex.force.jumbo=true

if i remove google-play-service.jar than it works fine but if i add it error message comes like Unable to execute dex: method ID not in [0, 0xffff]: 65536

any idea how can i solve this ? your suggestions are appreciable.

Steve Lillis
  • 3,263
  • 5
  • 22
  • 41
Harshal Kalavadiya
  • 2,412
  • 4
  • 38
  • 71

1 Answers1

1

This is the 65k issue. Your jar files contains more than 65k methods which the compiler can't handle resolving this. Moving to Android studio is the best option here.Google added multidex support in v0.14.0 of the Android Gradle plugin, so now things are very straight-forward.Find the solution here.

Now, if you don't want to move to studio at the moment, you can do one workaround. You have to identify the unused methods in your jar file say,google play service jar file(In fact, most may be unused) and remove that. After removing those methods, create new jar file and replace the old one. But I recommend you to move to Android Studio as soon as possible, since the Android developers' website is recommending that.

DGN
  • 702
  • 3
  • 12