我正在尝试构建./gralde assembleAndroidTest,结果是错误
失败:构建失败,并出现异常。
出了什么问题:
任务':react-native-custom-tabs:transformDexArchiveWithExternalLibsDexMergerForDebugAndroidTest'的执行失败。
java.lang.RuntimeException:java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException:无法合并 dex
以下是我的项目gradle详细信息:
app / build.gradle
androidTestImplementation(project(path: ":detox"))
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test:rules:1.0.1'
ext {
supportLibVersion = "27.0.2"
playServicesVersion = "11.8.0"
reactNativeVersion = "0.53.3"
}
android / build.gradle:
ext {
compileSdkVersion = 27
buildToolsVersion = "27.0.2"
targetSDKVersion = 27
minSDKVersion = 21
}
react-native-custome-tabs / build.gradle:
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
}
dependencies {
compile "com.facebook.react:react-native:+"
compile 'com.android.support:customtabs:25.0.1'
compile ('com.github.droibit.customtabslauncher:launcher:1.0.8') {
exclude module: 'customtabs'
}
testCompile 'junit:junit:4.12'
}
两个build.gradle都收到冲突错误消息
答案 0 :(得分:0)
使用compile 'com.android.support:customtabs:23.0.1'