Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Android] Duplicate class com.google.android.play.core.common after upgrade from 2.0.4 to 2.2.4 #26

Open
fdobre opened this issue Dec 7, 2022 · 4 comments

Comments

@fdobre
Copy link

fdobre commented Dec 7, 2022

It seems that react-native-wonderpush is using com.google.android.play.core version 2.0.0 and top 2 react-native libraries used for app review/rating use older versions of that module. Tried both react-native-store-review and react-native-in-app-review latest versions.

Duplicate class com.google.android.play.core.common.IntentSenderForResultStarter found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.0-runtime (com.google.android.play:core-common:2.0.0)
     Duplicate class com.google.android.play.core.common.LocalTestingException found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.0-runtime (com.google.android.play:core-common:2.0.0)
     Duplicate class com.google.android.play.core.common.PlayCoreDialogWrapperActivity found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.0-runtime (com.google.android.play:core-common:2.0.0)
     Duplicate class com.google.android.play.core.listener.StateUpdatedListener found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.0-runtime (com.google.android.play:core-common:2.0.0)
     Duplicate class com.google.android.play.core.review.ReviewInfo found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0)
     Duplicate class com.google.android.play.core.review.ReviewManager found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0)
     Duplicate class com.google.android.play.core.review.ReviewManagerFactory found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0)
     Duplicate class com.google.android.play.core.review.testing.FakeReviewManager found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0)

Is there any workaround to avoid such conflicts for react-native-wonderpush 2.2.x?

Added a stackoverflow question here:

https://stackoverflow.com/questions/74692599/react-native-store-review-duplicate-class-com-google-android-play-core-common

I will attach a bounty to it this evening.

Any response that could help in finding a workaround will be greatly appreciated.

@nofearsk
Copy link

nofearsk commented Dec 7, 2022

+1

@fdobre fdobre changed the title [Question][Android] Duplicate class com.google.android.play.core.common after upgrade from 2.0.4 to 2.2.4 [Android] Duplicate class com.google.android.play.core.common after upgrade from 2.0.4 to 2.2.4 Jan 9, 2023
@fdobre
Copy link
Author

fdobre commented Jan 9, 2023

@ofavre Issue seems to be created by line 71 here:

https://github.com/wonderpush/wonderpush-android-sdk/blob/master/sdk/build.gradle

    // needed by openAppRating
    implementation 'com.google.android.play:review:2.0.0'

This makes all the react-native app rating libraries unusable together with react-native-wonderpush because of duplicate class errors.

If you are aware of any possible workaround please advise. Any suggestion will be greatly appreciated.

Doubled the bounty here: https://stackoverflow.com/questions/74692599/react-native-store-review-duplicate-class-com-google-android-play-core-common

@fdobre
Copy link
Author

fdobre commented Feb 17, 2023

To fix the issue we had to make a PR in the library (react-native-inapp-review) that had conflicts with react-native-wonderpush dependencies.

More info at the stackoverflow link I added in my previous comment.

@uffoltzl
Copy link

uffoltzl commented Nov 29, 2023

I have the exact same problem, is it possible to fix it directly in react-native-wonderpush instead of having to fork another lib?

---- EDIT

Fix it by upgrading "react-native-store-review" to "^0.4.3". Maybe this could be added in the documentation as troubleshooting.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants