5

I am getting exception:

Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

after i updated the Google Play services to 7.5.0 as:

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

but if i change it back to:

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

everything is working fine, i am also facing the same problem if i add Google Cloud Backend Module in my project.

Shajeel Afzal
  • 5,913
  • 6
  • 43
  • 70
  • this happen when you add jar file to libs folder & same you compile in gradle using gradle dependencies. – Amit Oct 25 '15 at 12:31

2 Answers2

4

Your solution is here. More specifically at the "Selectively compiling APIs into your executable" section here.

By using com.google.android.gms:play-services:7.5.0, you are compiling with all Google Play services APIs. You should use the Google Play services APIs that you need.

For example, if you need Google+, then you use, com.google.android.gms:play-services-plus:7.5.0

Hope this helps.

nevzo
  • 198
  • 1
  • 8
0

I had this trace as well:

Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/mypackage/ClassX;

The problem was that I was adding the same class in two differents libraries. Removing the class/jar file from one of the libraries, the project run properly

https://stackoverflow.com/a/34996864/2390685

Community
  • 1
  • 1
mromer
  • 1,867
  • 1
  • 13
  • 18