0

am getting the error given below after adding google-play-services library into my project

" [2015-08-26 07:59:37 - Dex Loader] Unable to execute dex: method ID not in [0, 0xffff]: 65536 [2015-08-26 07:59:37 - my-application] Conversion to Dalvik format failed: Unable to execute dex: method ID not in [0, 0xffff]: 65536 "

Am using Android 5.0.1 with target=21, i added dex.force.jumbo=true at the 1st line of my project.properties, this did not worked for me But disabling android-private-properties library worked for me, but i need android-private-library as am using "android.support.v4.widget.DrawerLayout" in xml layout, without private library it wont work. Am using Eclipse IDE Version: Luna Service Release 2 (4.4.2). Kindly please help me on this

  • You surpassed the 65k limit method count. You should migrate to Android Studio and use MultiDex and/or split up google-play-services. – Jared Rummler Aug 26 '15 at 02:32
  • please tell me how can i split up google-play-services. –  Aug 26 '15 at 02:37
  • If you use gradle you can select which APIs to compile: https://developers.google.com/android/guides/setup If you aren't using gradle, there are some scripts out in the wild that will do it for you (I don't have any links handy). – Jared Rummler Aug 26 '15 at 02:41
  • 1
    possible duplicate of [Unable to execute dex: method ID not in \[0, 0xffff\]: 65536](http://stackoverflow.com/questions/15209831/unable-to-execute-dex-method-id-not-in-0-0xffff-65536) – JesusFreke Aug 26 '15 at 04:33

1 Answers1

1

You surpassed the 65k method limit in DEX.

Earlier versions of Android build system report the error as follows:

Conversion to Dalvik format failed:

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

You can read about the problem and an official workaround here: http://developer.android.com/tools/building/multidex.html


Google Play Services is a major reason you are reaching this limit. If you switch to the gradle build system you can specify which APIs to compile into your executable. See: https://developers.google.com/android/guides/setup

Community
  • 1
  • 1
Jared Rummler
  • 37,824
  • 19
  • 133
  • 148
  • Using Eclipse is it not possible ?? –  Aug 26 '15 at 05:10
  • You would need to use gradle as your build system. I haven't done it personally but this is from a quick google search: http://stackoverflow.com/questions/19912393/is-there-any-way-to-integrate-eclipse-with-gradle-in-android-project IMHO it would be easier to migrate to Android Studio. – Jared Rummler Aug 26 '15 at 05:40
  • instead of using google-play-services jar is there any other way where i can just use the jars related to google drive api –  Aug 26 '15 at 06:23