Reputation: 208
Error:The number of method references in a .dex file cannot exceed 64K. Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 2
Upvotes: 0
Views: 303
Reputation: 4705
You read both following notes from https://developer.android.com/tools/building/multidex.html, if yes then please implement this way or no then read apply it may be help you.
Note: If your project is configured for multidex with minSdkVersion 20 or lower, and you deploy to target devices running Android 4.4 (API level 20) or lower, Android Studio disables Instant Run.
Note: While using Instant Run, Android Studio automatically configures your app for multidex when your app's minSdkVersion is set to 21 or higher. Because Instant Run only works with the debug version of your app, you still need to configure your release build for multidex to avoid the 64K limit.
Upvotes: 0
Reputation: 590
With Android Studio 2.0, 'Instant Run' option is default enabled and quickest solution for your problem is to disable 'Instant Run' option from Android studio Settings.
You can find that setting under the "Build, Execution, Deployment" settings.
To use Instant Run feature fix the multidex problem by following https://developer.android.com/tools/building/multidex.html.
Upvotes: 1