Duplicate class com.google.android.play.core.appupdate.AppUpdateInfo found in modules issue.

huangapple go评论86阅读模式
英文:

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"
}

huangapple
  • 本文由 发表于 2023年3月1日 15:51:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/75600848.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定