Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 414
Ali Hamza Avatar asked May 19 '26 10:05

Ali Hamza


2 Answers

Add the below code in app level build.gradle file and inside dependencies section, 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"
}
like image 165
Tippu Fisal Sheriff Avatar answered May 22 '26 01:05

Tippu Fisal Sheriff


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"
}
like image 25
ch3t Avatar answered May 22 '26 01:05

ch3t



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!