android - 重复 key com.android.build.gradle.internal.api.artifact.BuildableArtifactImpl@7c139f68

标签 android android-gradle-plugin

我已将我的 android studio 更新到 3.2 canary8。它在配置构建时引发异常。重复键 com.android.build.gradle.internal.api.artifact.BuildableArtifactImpl@7c139f68。有谁遇到了这个问题,如何解决?

最佳答案

在 build.gradle 的 productFlavors 中将名称“main”更改为另一个名称。

productFlavors {
    main {
        //...
    }
    qa {
        //...
    }
}

新格式:

productFlavors {
    orginal {
        //...
    }
    qa {
        //...
    }
}

关于android - 重复 key com.android.build.gradle.internal.api.artifact.BuildableArtifactImpl@7c139f68,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49509518/

相关文章:

java - 如何确定列表中的选择百分比

android - 在添加底部导航时在工具栏顶部获得不必要的空间

unit-testing - 为什么 Android Studio 会说 "Test events were not received"?

android - 无法实现 androidx.appcompat.appcompat :1. 0.0

android - Gradle调试并启动应用

android - Coroutines Handler 类行为

java - Android ClassNotFoundException 在路径 : DexPathList 上找不到类

android - 如何在指定时间执行adb shell monkey?

Android-错误 :Execution failed for task ':app:transformClassesWithDexForRelease'

java - 无法解析配置 ':app:androidApis' 的所有文件