saeed shahini saeed shahini - 4 months ago 16x
Java Question

i am trying to integrate google sign in , in my app,i added these libraries:

compile ''
compile ''

also add this to project build gradle:

classpath ''

also add plugin to app build gradle:

apply plugin: ''

then add required permissions
but when i try to run my app , recived this error:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0\bin\java.exe'' finished with non-zero exit value 2


Try adding multiDexEnabled true to your app build.gradle file.

 defaultConfig {
    multiDexEnabled true


Try Steve's answer first. In case it happens frequently or first step didn't help multiDexEnabled might help. For those who love to dig deeper here is couple similar issues (with more answers):

:app:dexDebug ExecException finished with non-zero exit value 2 Error:Execution failed for task ':app:dexDebug'.