gpt4 book ai didi

java - 错误:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug

转载 作者:太空宇宙 更新时间:2023-11-04 10:49:21 25 4
gpt4 key购买 nike

这是依赖项

dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile group: 'io.nlopez.smartlocation', name: 'library', version: '3.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.android.gms:play-services-location:11.4.2'
compile 'com.google.android.gms:play-services-base:11.4.2'
compile 'com.google.android.gms:play-services-maps:11.4.2'
compile 'com.github.arimorty:floatingsearchview:2.1.1'
compile 'com.jota.autocompletelocation:autocomplete-location:0.9.0'
testCompile 'junit:junit:4.12'
}

当我运行我的应用程序时出现此错误。

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

com.android.builder.dexing.DexArchiveMergerException: com.android.tools.r8.errors.CompilationError: Program type already present: com.google.android.gms.internal.zzbcg

我该如何解决这个问题???

最佳答案

替换实现'com.android.support.constraint:constraint-layout:1.0.2'

使用编译'com.android.support.constraint:constraint-layout:1.0.2'如下面的代码

    dependencies {

compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile group: 'io.nlopez.smartlocation', name: 'library', version: '3.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.android.gms:play-services-location:11.4.2'
compile 'com.google.android.gms:play-services-base:11.4.2'
compile 'com.google.android.gms:play-services-maps:11.4.2'
compile 'com.github.arimorty:floatingsearchview:2.1.1'
compile 'com.jota.autocompletelocation:autocomplete-location:0.9.0'
testCompile 'junit:junit:4.12'
}

关于java - 错误:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48007256/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com