英文:
Duplicate class com.google.android.play.core.appupdate.AppUpdateInfo found in modules issue
问题
"Duplicate class com.google.android.play.core.install.InstallState found in modules jetified-app-update-2.0.1-runtime.jar (com.google.android.play:app-update:2.0.1) and jetified-core-1.8.0-runtime.jar (com.google.android.play:core:1.8.0)" 安装调试版本时,我遇到了这个问题。
我正在使用 "sp-react-native-in-app-updates": "^1.1.1" 这个库来进行应用内更新。
有没有人有解决方案?
我尝试过清理 gradlew,升级到新版本,并从 app.gradle 中移除了 implementation 'com.google.android.play:core:1.7.3'。
英文:
Hi I am facing this issue "Duplicate class com.google.android.play.core.install.InstallState found in modules jetified-app-update-2.0.1-runtime.jar (com.google.android.play:app-update:2.0.1) and jetified-core-1.8.0-runtime.jar (com.google.android.play:core:1.8.0)" while installing debug build.
I am using "sp-react-native-in-app-updates": "^1.1.1" this library for in app updates.
Anyone who has solution?
Well I tried to clean gradlew. upgrading to new version. implementation 'com.google.android.play:core:1.7.3' removed this from app.gradle
答案1
得分: 2
将以下代码添加到android/app/build.gradle文件的依赖部分:
implementation (project(':sp-react-native-in-app-updates'))
{
exclude group: "com.google.android.play", module: "app-update"
exclude group: "com.google.android.play", module: "core"
}
英文:
add the below code in dependencies section of android/app/build.gradle
implementation (project(':sp-react-native-in-app-updates'))
{
exclude group: "com.google.android.play", module: "app-update"
exclude group: "com.google.android.play", module: "core"
}
答案2
得分: 1
把以下代码加入应用级别的Gradle文件中,在原生Android开发中我们遵循这些方法。
示例 1:
configurations {
all {
exclude group: "com.google.android.play", module: "app-update"
exclude group: "com.google.android.play", module: "core"
}
}
示例 2:
"sp-react-native-in-app-updates": "^1.1.1" {
exclude group: "com.google.android.play", module: "app-update"
exclude group: "com.google.android.play", module: "core"
}
英文:
Add the below code in app level gradle file, in native android development we follow these methods.
Example 1:
configurations {
all {
exclude group: "com.google.android.play", module: "app-update"
exclude group: "com.google.android.play", module: "core"
}
}
Example 2:
"sp-react-native-in-app-updates": "^1.1.1" {
exclude group: "com.google.android.play", module: "app-update"
exclude group: "com.google.android.play", module: "core"
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论