3 Replies Latest reply on Sep 7, 2016 2:47 PM by georgew76584710

    Android build fail task :transformClassesWithDexForRelease

    georgew76584710 Level 1

      Hi

       

      The Android build of my app has started failing recently (at least for the last 3 weeks, possibly prior).

       

      It seems if I remove the plugin cordova-plugin-analytics-adid then there is no error.

      iOS is building either way.

       

      I was building with phonegap cli-5.2.0, but now it fails with both cli-5.2.0 and cli-6.3.0.

      I tried an older version of the plugin cordova-plugin-analytics-adid, version 1.1.1 and 1.1.2 both fail.

       

      The error the log shows:

       

      * What went wrong:

      Execution failed for task ':transformClassesWithDexForRelease'.

      > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536

       

      Any ideas about the cause of this issue, or possible fixes? Or alternatives to that plugin that still allows me to collect the google advertising ID?

       

      This issue looks related, however it doesn't really explain how I can fix the issue.

       

      Thank you!

       

      My App ID is 1543004

       

      Below are my config and build log

       

      <widget id="--- snip ---" version="1.5.2" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">

          --- snip name, description, author ---

          <content src="index.html" />

          <preference name="phonegap-version" value="cli-6.3.0" />

          <preference name="BackupWebStorage" value="local" />

          <preference name="iosPersistentFileLocation" value="Library" />

          <preference name="DisallowOverscroll" value="true" />

          <preference name="BackupWebStorage" value="none" />

          <preference name="show-splash-screen-spinner" value="true" />

          <preference name="auto-hide-splash-screen" value="true" />

          <preference name="permissions" value="none" />

          <preference name="android-minSdkVersion" value="14" />

          <preference name="android-build-tool" value="gradle" />

       

          <gap:plugin name="cordova-plugin-file" version="~4.2.0" source="npm" />

          <gap:plugin name="cordova-plugin-file-transfer" version="~1.5.1" source="npm" />

          <gap:plugin name="cordova-plugin-geolocation" version="~2.2.0" source="npm" />

          <gap:plugin name="cordova-plugin-console" version="~1.0.3" source="npm" />

          <gap:plugin name="cordova-plugin-zip" version="~3.1.0" source="npm" />

          <gap:plugin name="cordova-plugin-inappbrowser" version="~1.4.0" source="npm" />

          <gap:plugin name="cordova-plugin-whitelist" version="~1.2.2" source="npm" />

          <gap:plugin name="cordova-plugin-transport-security" version="~0.1.2" source="npm" />

          <gap:plugin name="cordova-plugin-analytics" version="~1.4.0" source="npm" />

          <gap:plugin name="cordova-plugin-analytics-adid" version="~1.1.2" source="npm" />

       

          <allow-intent href="http://*/*" />

          <allow-intent href="https://*/*" />

          <allow-intent href="sms:*" />

          <allow-intent href="tel:*" />

          <allow-intent href="geo:*" />

          <access origin="*" />

       

          --- snip icons ---

      </widget>

       

      Android build log:

       

      Build Date: 2016-09-06 11:46:23 +0000

      Configuration on demand is an incubating feature.

      Incremental java compilation is an incubating feature.

      :preBuild UP-TO-DATE

      :preReleaseBuild UP-TO-DATE

      :checkReleaseManifest

      :preDebugBuild UP-TO-DATE

      :CordovaLib:preBuild UP-TO-DATE

      :CordovaLib:preDebugBuild UP-TO-DATE

      :CordovaLib:compileDebugNdk UP-TO-DATE

      :CordovaLib:compileLint

      :CordovaLib:copyDebugLint UP-TO-DATE

      :CordovaLib:mergeDebugProguardFiles

      :CordovaLib:packageDebugRenderscript UP-TO-DATE

      :CordovaLib:checkDebugManifest

      :CordovaLib:prepareDebugDependencies

      :CordovaLib:compileDebugRenderscript

      :CordovaLib:generateDebugResValues

      :CordovaLib:generateDebugResources

      :CordovaLib:packageDebugResources

      :CordovaLib:compileDebugAidl

      :CordovaLib:generateDebugBuildConfig

      :CordovaLib:mergeDebugShaders

      :CordovaLib:compileDebugShaders

      :CordovaLib:generateDebugAssets

      :CordovaLib:mergeDebugAssets

      :CordovaLib:processDebugManifest

      :CordovaLib:processDebugResources

      :CordovaLib:generateDebugSources

      :CordovaLib:incrementalDebugJavaCompilationSafeguard

      :CordovaLib:compileDebugJavaWithJavac

      :CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      :CordovaLib:processDebugJavaRes UP-TO-DATE

      :CordovaLib:transformResourcesWithMergeJavaResForDebug

      :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug

      :CordovaLib:mergeDebugJniLibFolders

      :CordovaLib:transformNative_libsWithMergeJniLibsForDebug

      :CordovaLib:transformNative_libsWithSyncJniLibsForDebug

      :CordovaLib:bundleDebug

      :CordovaLib:preReleaseBuild UP-TO-DATE

      :CordovaLib:compileReleaseNdk UP-TO-DATE

      :CordovaLib:copyReleaseLint UP-TO-DATE

      :CordovaLib:mergeReleaseProguardFiles

      :CordovaLib:packageReleaseRenderscript UP-TO-DATE

      :CordovaLib:checkReleaseManifest

      :CordovaLib:prepareReleaseDependencies

      :CordovaLib:compileReleaseRenderscript

      :CordovaLib:generateReleaseResValues

      :CordovaLib:generateReleaseResources

      :CordovaLib:packageReleaseResources

      :CordovaLib:compileReleaseAidl

      :CordovaLib:generateReleaseBuildConfig

      :CordovaLib:mergeReleaseShaders

      :CordovaLib:compileReleaseShaders

      :CordovaLib:generateReleaseAssets

      :CordovaLib:mergeReleaseAssets

      :CordovaLib:processReleaseManifest

      :CordovaLib:processReleaseResources

      :CordovaLib:generateReleaseSources

      :CordovaLib:incrementalReleaseJavaCompilationSafeguard

      :CordovaLib:compileReleaseJavaWithJavac

      :CordovaLib:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      :CordovaLib:processReleaseJavaRes UP-TO-DATE

      :CordovaLib:transformResourcesWithMergeJavaResForRelease

      :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease

      :CordovaLib:mergeReleaseJniLibFolders

      :CordovaLib:transformNative_libsWithMergeJniLibsForRelease

      :CordovaLib:transformNative_libsWithSyncJniLibsForRelease

      :CordovaLib:bundleRelease

      :prepareComAndroidSupportAppcompatV72300Library

      :prepareComAndroidSupportMediarouterV72300Library

      :prepareComAndroidSupportSupportV42300Library

      :prepareComGoogleAndroidGmsPlayServices940Library

      :prepareComGoogleAndroidGmsPlayServicesAds940Library

      :prepareComGoogleAndroidGmsPlayServicesAdsLite940Library

      :prepareComGoogleAndroidGmsPlayServicesAnalytics940Library

      :prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl940Library

      :prepareComGoogleAndroidGmsPlayServicesAppindexing940Library

      :prepareComGoogleAndroidGmsPlayServicesAppinvite940Library

      :prepareComGoogleAndroidGmsPlayServicesAuth940Library

      :prepareComGoogleAndroidGmsPlayServicesAuthBase940Library

      :prepareComGoogleAndroidGmsPlayServicesBase940Library

      :prepareComGoogleAndroidGmsPlayServicesBasement940Library

      :prepareComGoogleAndroidGmsPlayServicesCast940Library

      :prepareComGoogleAndroidGmsPlayServicesCastFramework940Library

      :prepareComGoogleAndroidGmsPlayServicesClearcut940Library

      :prepareComGoogleAndroidGmsPlayServicesContextmanager940Library

      :prepareComGoogleAndroidGmsPlayServicesDrive940Library

      :prepareComGoogleAndroidGmsPlayServicesFitness940Library

      :prepareComGoogleAndroidGmsPlayServicesGames940Library

      :prepareComGoogleAndroidGmsPlayServicesGass940Library

      :prepareComGoogleAndroidGmsPlayServicesGcm940Library

      :prepareComGoogleAndroidGmsPlayServicesIdentity940Library

      :prepareComGoogleAndroidGmsPlayServicesIid940Library

      :prepareComGoogleAndroidGmsPlayServicesLocation940Library

      :prepareComGoogleAndroidGmsPlayServicesMaps940Library

      :prepareComGoogleAndroidGmsPlayServicesNearby940Library

      :prepareComGoogleAndroidGmsPlayServicesPanorama940Library

      :prepareComGoogleAndroidGmsPlayServicesPlaces940Library

      :prepareComGoogleAndroidGmsPlayServicesPlus940Library

      :prepareComGoogleAndroidGmsPlayServicesSafetynet940Library

      :prepareComGoogleAndroidGmsPlayServicesTagmanager940Library

      :prepareComGoogleAndroidGmsPlayServicesTagmanagerApi940Library

      :prepareComGoogleAndroidGmsPlayServicesTasks940Library

      :prepareComGoogleAndroidGmsPlayServicesVision940Library

      :prepareComGoogleAndroidGmsPlayServicesWallet940Library

      :prepareComGoogleAndroidGmsPlayServicesWearable940Library

      :prepareComGoogleFirebaseFirebaseAnalytics940Library

      :prepareComGoogleFirebaseFirebaseAnalyticsImpl940Library

      :prepareComGoogleFirebaseFirebaseAuth940Library

      :prepareComGoogleFirebaseFirebaseAuthCommon940Library

      :prepareComGoogleFirebaseFirebaseAuthModule940Library

      :prepareComGoogleFirebaseFirebaseCommon940Library

      :prepareComGoogleFirebaseFirebaseConfig940Library

      :prepareComGoogleFirebaseFirebaseCrash940Library

      :prepareComGoogleFirebaseFirebaseDatabase940Library

      :prepareComGoogleFirebaseFirebaseDatabaseConnection940Library

      :prepareComGoogleFirebaseFirebaseIid940Library

      :prepareComGoogleFirebaseFirebaseMessaging940Library

      :prepareComGoogleFirebaseFirebaseStorage940Library

      :prepareComGoogleFirebaseFirebaseStorageCommon940Library

      :prepareProjectCordovaLibUnspecifiedReleaseLibrary

      :prepareReleaseDependencies

      :compileReleaseAidl

      :compileReleaseRenderscript

      :generateReleaseBuildConfig

      :mergeReleaseShaders

      :compileReleaseShaders

      :generateReleaseAssets

      :mergeReleaseAssets

      :generateReleaseResValues

      :generateReleaseResources

      :mergeReleaseResources

      :processReleaseManifest

      :processReleaseResources

      :generateReleaseSources

      :incrementalReleaseJavaCompilationSafeguard

      :compileReleaseJavaWithJavac

      :compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      Note: Some input files use unchecked or unsafe operations.

      Note: Recompile with -Xlint:unchecked for details.

      :compileReleaseNdk UP-TO-DATE

      :compileReleaseSources

      :prePackageMarkerForRelease

      :transformClassesWithDexForRelease FAILED

       

      FAILURE: Build failed with an exception.

       

      * What went wrong:

      Execution failed for task ':transformClassesWithDexForRelease'.

      > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536

       

      * Try:

      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

       

      BUILD FAILED

       

      Total time: 21.061 secs

      Error: /project/gradlew: Command failed with exit code 1 Error output:

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      Note: Some input files use unchecked or unsafe operations.

      Note: Recompile with -Xlint:unchecked for details.

       

      FAILURE: Build failed with an exception.

       

      * What went wrong:

      Execution failed for task ':transformClassesWithDexForRelease'.

      > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536

       

      * Try:

      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

        at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)

        at emitTwo (events.js:87:13)

        at ChildProcess.emit (events.js:172:7)

        at maybeClose (internal/child_process.js:818:16)

        at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)