【发布时间】:2018-01-25 11:01:46
【问题描述】:
FAILURE:构建失败并出现异常。
- 出了什么问题:
任务 ':app:transformClassesWithDexForRelease' 执行失败。
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: 返回码 1对于 dex 进程
我们正在使用这个库
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'
【问题讨论】:
-
您是否尝试过清理 gradle 构建然后重新构建它?
-
我认为这个 github 问题与你的问题不同,所以我建议你使用 android studio 来构建项目,在事件日志中你可以检查有问题的代码。
标签: android react-native build apk