title: Execution failed for task ':MyApp:dexDebug'
body: <p>I recently switched from Eclipse to Android Studio and I'm having a problem getting my app to compile. I've dealt with a number of issues and have been able to solve them all except one:</p>
  
  <pre><code>Error:Execution failed for task ':MyApp:dexDebug'.
  &gt; com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
  </code></pre>
  
  <p>I read that this may mean you have duplicate jars so I checked my gradle config but it looks fine. I even went through and commented compiles out one-by-one (and many-to-one / one-to-many) with no avail. Here's my gradle config:</p>
  
  <pre><code>dependencies {
      compile project(':comcrashlyticssdkandroid_crashlytics_2')
      compile 'com.android.support:support-v4:18.0.0'
      compile 'com.google.android.gms:play-services:+'
      compile files('libs/libGoogleAnalyticsServices.jar')
      compile files('libs/gcm.jar');
  }
  </code></pre>
  
  <p>My best guess is the <code>libs/gcm.jar</code> because gcm is "deprecated" to google play services. However, there is no gcm to play services migration so I'm stuck with gcm for now.</p>
  
  <p>Another FYI is that I was getting a dex compilation issue in Eclipse but I would remove "Private Libraries" from the project and everything was fine. Is there an equivalent to this in Android Studio perhaps?</p>
  
  <p>My biggest question is what do you suggest I try next to solve this issue?</p>