I have a little problem here, if i want to build a APK in Android Studio i get this error message:
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 '/usr/local/java/jdk1.8.0_77/bin/java'' finished with non-zero exit value 2
I found an answer on StackOverflow that said to compile this dependency in my Gradle file:
compile 'com.android.support:multidex:1.0.0'
but that didn't work.
Here's my Gradle file:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.android.support:multidex:1.0.0'
}