android : Error:Execution failed for task ‘:app:dexDebug’

Getting the following error while running the project:

Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 2

Before it was running well.

I am trying to integrate the Android Asynchronous Http Client

The page says to integrate the following line:

dependencies {
  compile 'com.loopj.android:android-async-http:1.4.9'
}

So, my resultant build.gradle is:

...
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.github.johnkil.android-robototextview:robototextview:2.4.0'
    compile 'com.android.support:design:23.0.1'
    compile 'de.hdodenhof:circleimageview:1.3.0'
    compile 'com.github.clans:fab:1.6.0'
    compile 'com.cocosw:bottomsheet:[email protected]'
    compile 'com.android.support:cardview-v7:23.0.1'
    compile 'com.android.support:recyclerview-v7:23.0.1'
    compile 'org.igniterealtime.smack:smack-android:4.1.3'
    compile 'org.igniterealtime.smack:smack-bosh:4.1.3'
    compile 'org.igniterealtime.smack:smack-tcp:4.1.3'
    compile 'org.igniterealtime.smack:smack-im:4.1.3'
    compile 'org.jxmpp:jxmpp-jid:0.5.0-alpha6'
    compile 'org.igniterealtime.smack:smack-extensions:4.1.3'
    compile 'com.android.support:support-v4:23.0.1'
    compile files('libs/volley-1.0-SNAPSHOT.jar')
    compile project(':emoji')
    compile "com.google.android.gms:play-services:7.8.0"
    compile 'com.loopj.android:android-async-http:1.4.9'
}
...  

Please help me out.

PS: I am working on ubuntu 15.0.4 with Android Studio 1.4 beta 4. Java version is Oracle java 8 update 60.

Answer

Just replace

compile "com.google.android.gms:play-services:7.8.0"

with

compile 'com.google.android.gms:play-services-gcm:7.8.0'

Leave a Reply

Your email address will not be published. Required fields are marked *