Adding Google App Engine Module: Error:Execution failed for task ':app:transformClassesWithDexForDebug'

0 views
Skip to first unread message

MicroR via StackOverflow

unread,
Dec 29, 2015, 12:33:04 PM12/29/15
to google-appengin...@googlegroups.com

What are the necessary gradle dependencies for an App Engine Backend with Google Cloud Messaging?

Currently, when you add a module like that to your Android Studio project it adds this dependency:

'compile 'com.google.android.gms:play-services:7.5.0'

However, when you run the project you get this error:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

Someone suggested using this:

defaultConfig {
        multiDexEnabled true
}

But that actually didn't work for me.

So it appears that I have to specify only the required libraries for GAE + GCM. So far I have:

compile 'com.google.android.gms:play-services-auth:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.android.gms:play-services-base:8.4.0'

full list here

Or is there some other way around this issue? What is weird is my old GAE + GCM projects work fine importing the whole google play services. Importing those older versions of google play services in my new project does not work however. So I am not sure what is going on.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/34515980/adding-google-app-engine-module-errorexecution-failed-for-task-apptransform
Reply all
Reply to author
Forward
0 new messages