0

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:transformClassesWithDexForRelease'.

    com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Return code 1 for dex process

we are using this libraries

dependencies {
    compile project(':react-native-android-location-services-dialog-box')
    compile project(':react-native-image-picker')
    compile "com.google.firebase:firebase-storage:11.8.0"
    implementation project(':react-native-maps')
    implementation(project(':react-native-firebase')) {
        transitive = false
    }
    implementation project(':react-native-fetch-blob')
    implementation project(':react-native-image-resizer')




    implementation project(':react-native-maps')

    // Firebase dependencies
    implementation 'com.android.support:multidex:1.0.1'
    implementation "com.google.android.gms:play-services-base:11.8.0"
    implementation "com.google.firebase:firebase-core:11.8.0"
    implementation "com.google.firebase:firebase-auth:11.8.0"
    implementation 'com.google.firebase:firebase-firestore:11.8.0'
    implementation 'com.google.firebase:firebase-database:11.8.0'

    implementation 'com.google.android.gms:play-services-vision:11.8.0'
    implementation project(':react-native-contacts')
    implementation project(':react-native-linear-gradient')

    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:27.0.1"
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation(project(':react-native-maps')){
            exclude group: 'com.google.android.gms', module: 'play-services-base'
            exclude group: 'com.google.android.gms', module: 'play-services-maps'
        }

    implementation 'com.google.android.gms:play-services-base:11.8.0'
    implementation 'com.google.android.gms:play-services-maps:11.8.0'
        implementation 'com.google.android.gms:play-services-location:11.8.0'
     implementation 'com.squareup.okhttp3:okhttp:3.8.1'

    implementation(project(':react-native-mauron85-background-geolocation')){
            exclude group: 'com.google.android.gms', module: 'play-services-location'
        }

}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

apply plugin: 'com.google.gms.google-services'
Afsara
  • 1,411
  • 3
  • 13
  • 31
  • did you tried cleaning the gradle build and then rebuild it? – Shahzad Jan 25 '18 at 11:52
  • issue : https://github.com/mauron85/react-native-background-geolocation/issues/131 – Afsara Jan 25 '18 at 11:56
  • I think this github issue is different is from your issue so I suggest you to use android studio to build project and in event log you can check the problematic code. – Shahzad Jan 25 '18 at 12:01

1 Answers1

-2

This comment helped me.

Basically, you have to compile every dependencies yourself.

  compile "com.google.android.gms:play-services-base:11.4.2"
  compile "com.google.android.gms:play-services-base-license:11.4.2"
  compile "com.google.android.gms:play-services-ads:11.4.2"
  compile "com.google.android.gms:play-services-ads-lite:11.4.2"
  compile "com.google.android.gms:play-services-ads-license:11.4.2"
  compile "com.google.android.gms:play-services-analytics:11.4.2"
  compile "com.google.android.gms:play-services-analytics-impl:11.4.2"
  compile "com.google.android.gms:play-services-auth:11.4.2"
  compile "com.google.android.gms:play-services-auth-base:11.4.2"
  compile "com.google.android.gms:play-services-fitness:11.4.2"
  compile "com.google.android.gms:play-services-gcm:11.4.2"
  compile "com.google.android.gms:play-services-identity:11.4.2"
  compile "com.google.android.gms:play-services-maps:11.4.2"
  compile "com.google.android.gms:play-services-wallet:11.4.2"
Poptocrack
  • 2,879
  • 1
  • 12
  • 28