-1

I have problem adding mail.jar and activation.jar to my Android Project. When I try to launch in emulator I always get this messagge:

Conversion to Dalvik format failed: Unable to execute dex: method ID not in [0, 0xffff]: 65536

Without this two jars everything starts correctly:

[2016-01-20 09:49:57 - FT2500-Mobile] Android Launch!
[2016-01-20 09:49:57 - FT2500-Mobile] adb is running normally.
[2016-01-20 09:49:57 - FT2500-Mobile] Performing com.econorma.activities.MainActivity activity launch
[2016-01-20 09:49:58 - FT2500-Mobile] Uploading FT2500-Mobile.apk onto device 'emulator-5554'
[2016-01-20 09:50:01 - FT2500-Mobile] Installing FT2500-Mobile.apk...
[2016-01-20 09:50:27 - FT2500-Mobile] Success!
[2016-01-20 09:50:27 - FT2500-Mobile] Starting activity com.econorma.activities.MainActivity on device emulator-5554
[2016-01-20 09:50:27 - FT2500-Mobile] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.econorma.ft2500/com.econorma.activities.MainActivity }

I tried also to remove Google_play_service.lib and replace with and older one (version 21), but I have a NoClassDefFoundError in javax.activation Mail.

Alessandro Mattiuzzi
  • 2,309
  • 2
  • 18
  • 24

1 Answers1

0

Congratulations! You've exceeded the method id amount. More info about this.

To use this library, you need to use multidex. Add this line line into your dependencies section inside build.gradle:

dependencies {
    // Other dependencies
    compile 'com.android.support:multidex:1.0.1'
    // Other dependencies
}

Also, you need to extend your Application class from MultiDexApplication

Community
  • 1
  • 1
IlyaGulya
  • 957
  • 6
  • 18