android - 任务':react-native-custom-tabs:transformDexArchiveWithExternalLibsDexMergerForDebugAndroidTest'的执行失败
问题描述
我正在尝试构建 ./grade assembleAndroidTest,结果是一个错误
FAILURE:构建失败并出现异常。
什么地方出了错:
任务“:react-native-custom-tabs:transformDexArchiveWithExternalLibsDexMergerForDebugAndroidTest”执行失败。
java.lang.RuntimeException:java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException:无法合并dex
以下是我的项目 gradle 详细信息:
应用程序/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"
}
安卓/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 中都收到冲突错误消息
解决方案
利用compile 'com.android.support:customtabs:23.0.1'
推荐阅读
- c++ - 如何复制多态对象
- neo4j - 获取配置文件计划每个部分的执行时间
- wpf - 如何让 WPF DataGrid 列绑定到枚举?
- azure - 如何在 Windows server 2019 上使用 DSC powershell 配置和安装 nano 服务器
- microsoft-graph-api - 如何创建传播到与会者副本的 openType 扩展?
- javascript - 如何在打字稿中创建可选的对象键字符串?
- facebook-marketing-api - 是否有任何端点可以获取所有自定义受众(facebook API)?
- c - 使用 semget/semctl 来使用信号量而不是使用 sem_init/post/wait 有什么区别?
- objective-c - 如何从自定义工作表按钮获取窗口的 NSControl*?
- fonts - 如何指定要更改字体颜色的某个值?