title: Android Execution failed for task ':app:transformClassesWithJarMergingForProductionDebug'
body: <p>When I run my app via Android studio everything works fine (it installs on the emulator without any worry). However when I use my CI (buddybuild), it fails with the following error message: (Command which was run: <code>gradle --no-daemon ":app:assemble"</code>)</p>
  
  <pre><code>:app:compileProductionDebugJavaWithJavac
  :app:compileProductionDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
  :app:compileProductionDebugNdk UP-TO-DATE
  :app:compileProductionDebugSources
  :app:transformClassesWithJarMergingForProductionDebug FAILED
  FAILURE: Build failed with an exception.
  * What went wrong:
  Execution failed for task ':app:transformClassesWithJarMergingForProductionDebug'.
  &gt; com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzcpp.class
  BUILD FAILED
  Total time: 42.054 secs
  </code></pre>
  
  <p>I've setup 2 product flavors (staging &amp; production) &amp; I have a feeling the setup to these might be causing this issue?</p>
  
  <p>Here is my build.gradle:</p>
  
  <pre><code>android {
      compileSdkVersion 25
      buildToolsVersion '25.0.1'
  
      dexOptions {
          javaMaxHeapSize "2g"
      }
  
      defaultConfig {
          applicationId "com.app"
          // react-native supports &gt;= 16
          minSdkVersion 16
          targetSdkVersion 22
          vectorDrawables.useSupportLibrary = true
          versionCode 1
          versionName "1.0"
          multiDexEnabled true
      }
  
      productFlavors {
          staging {
  //            applicationIdSuffix ".staging"
              applicationId "com.app.staging"
              resValue "string", "authority", "com.facebook.app.FacebookContentProvider&lt;ID_HERE&gt;"
          }
          production {
  //            applicationIdSuffix ".production"
              applicationId "com.app.production"
              resValue "string", "authority", "com.facebook.app.FacebookContentProvider&lt;ID_HERE&gt;"
          }
      }
  
  
      signingConfigs {
          release {
              if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
                  storeFile file(MYAPP_RELEASE_STORE_FILE)
                  storePassword MYAPP_RELEASE_STORE_PASSWORD
                  keyAlias MYAPP_RELEASE_KEY_ALIAS
                  keyPassword MYAPP_RELEASE_KEY_PASSWORD
              }
          }
      }
  
      splits {
          abi {
              reset()
              enable enableSeparateBuildPerCPUArchitecture
              universalApk true  // If true, also generate a universal APK
              include "armeabi-v7a", "x86"
          }
      }
      buildTypes {
          release {
              minifyEnabled enableProguardInReleaseBuilds
              proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
              signingConfig signingConfigs.release
          }
      }
      // applicationVariants are e.g. debug, release
      applicationVariants.all { variant -&gt;
          variant.outputs.each { output -&gt;
              // For each separate APK per architecture, set a unique version code as described here:
              // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
              def versionCodes = ["armeabi-v7a":1, "x86":2]
              def abi = output.getFilter(OutputFile.ABI)
              if (abi != null) {  // null for the universal-debug, universal-release variants
                  output.versionCodeOverride =
                          versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
              }
          }
      }
  
  }
  
  dependencies {
      compile project(':gl-react-native')
      compile project(':react-native-branch')
      compile project(':react-native-fbsdk')
      compile project(':react-native-linear-gradient')
      compile project(':react-native-action-sheet')
      compile project(':react-native-maps')
      compile project(':react-native-fs')
      compile project(':react-native-open-settings')
      compile project(':react-native-keychain')
      compile 'com.google.android.gms:play-services:11.0.4+'
      compile project(':react-native-push-notification')
      compile project(':react-native-mixpanel')
      compile fileTree(dir: "libs", include: ["*.jar"])
      compile "com.android.support:appcompat-v7:25.0.1"
      compile "com.facebook.react:react-native:+"  // From node_modules
      compile project(':react-native-extra-dimensions-android')
  }
  </code></pre>
  
  <p>Here is my AndroidManifest (note: the rest of the manifest is default):</p>
  
  <pre><code>&lt;provider
     android:name="com.facebook.FacebookContentProvider"
     android:authorities="@string/authority"
     android:exported="true" /&gt;
  </code></pre>
  
  <p>Is there any other information that would be helpful? Let me know. </p>
  
  <p>NOTE: If I run ./gradlew clean, if won't change any files.</p>