▸ Execution failed for task ':app:transformDexWithDexForRelease'. ▸ > 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
In some cases an Android Package build will fail with this error because the dex files being merged include more than 65536 methods. This is a relatively common issue in Android projects.
The first solution is to make use of a plugin that provides multidex functionality. Note that these are third party plugins and are subject to change/modification at any time:
The alternative is to enable multidex using a
Create a file named
build-extras.gradle in the root of your project with the following contents:
resource-file node to the Android platform in
config.xml with the target path shown below. This will move the
build-extras.gradle file to the correct location when your platform is generated.
<resource-file src="build-extras.gradle" target="app/build-extras.gradle" />
Be sure to commit the
build-extras.gradle file to your project repo.