Android Studio - UNEXPECTED TOP-LEVEL EXCEPTION com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
Par PlaceOweb le mercredi, novembre 11 2015, 19:38 - JAVA - Lien permanent
:app:dexDebug AGPBI: {"kind":"simple","text":"UNEXPECTED TOP-LEVEL EXCEPTION:","sources":[{}]} AGPBI: {"kind":"simple","text":"com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536","sources":[{}]} AGPBI: {"kind":"simple","text":"\tat com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:484)","sources":[{}]} AGPBI: {"kind":"simple","text":"\tat com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:261)","sources":[{}]} AGPBI: {"kind":"simple","text":"\tat com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:473)","sources":[{}]} AGPBI: {"kind":"simple","text":"\tat com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:161)","sources":[{}]} AGPBI: {"kind":"simple","text":"\tat com.android.dx.merge.DexMerger.merge(DexMerger.java:188)","sources":[{}]} AGPBI: {"kind":"simple","text":"\tat com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)","sources":[{}]} AGPBI: {"kind":"simple","text":"\tat com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)","sources":[{}]} AGPBI: {"kind":"simple","text":"\tat com.android.dx.command.dexer.Main.run(Main.java:277)","sources":[{}]} AGPBI: {"kind":"simple","text":"\tat com.android.dx.command.dexer.Main.main(Main.java:245)","sources":[{}]} AGPBI: {"kind":"simple","text":"\tat com.android.dx.command.Main.main(Main.java:106)","sources":[{}]} FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_66\bin\java.exe'' finished with non-zero exit value 2 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED
Google Play services and DEX method limits
Building Apps with Over 65K Methods
Weird : UNEXPECTED TOP-LEVEL EXCEPTION: Execution failed for task app:dexDebug
D:\StudioProjects\AppAndroid\app\build.gradle
defaultConfig { applicationId "com.placeoweb.android" minSdkVersion 9 targetSdkVersion 23 multiDexEnabled true // Google Play services and DEX method && Building Apps with Over 65K Methods }
Setting Up Google Play Services and Selectively compiling APIs into your executable
Description in build.gradle Google Play services API com.google.android.gms:play-services-plus:8.3.0 Google+ com.google.android.gms:play-services-auth:8.3.0 Google Account Login com.google.android.gms:play-services-base:8.3.0 Google Actions, Base Client Library com.google.android.gms:play-services-identity:8.3.0 Google Address API com.google.android.gms:play-services-appindexing:8.3.0 Google App Indexing com.google.android.gms:play-services-appinvite:8.3.0 Google App Invites com.google.android.gms:play-services-analytics:8.3.0 Google Analytics com.google.android.gms:play-services-cast:8.3.0 Google Cast com.google.android.gms:play-services-gcm:8.3.0 Google Cloud Messaging com.google.android.gms:play-services-drive:8.3.0 Google Drive com.google.android.gms:play-services-fitness:8.3.0 Google Fit com.google.android.gms:play-services-location:8.3.0 Google Location, Activity Recognition, and Places com.google.android.gms:play-services-maps:8.3.0 Google Maps com.google.android.gms:play-services-ads:8.3.0 Google Mobile Ads com.google.android.gms:play-services-vision:8.3.0 Mobile Vision com.google.android.gms:play-services-nearby:8.3.0 Google Nearby com.google.android.gms:play-services-panorama:8.3.0 Google Panorama Viewer com.google.android.gms:play-services-games:8.3.0 Google Play Game services com.google.android.gms:play-services-safetynet:8.3.0 SafetyNet com.google.android.gms:play-services-wallet:8.3.0 Google Wallet com.google.android.gms:play-services-wearable:8.3.0 Android Wear