capacitor-community / in-app-review

Let users rate your app using native review app dialog for both Android and iOS.
MIT License
163 stars 20 forks source link

Android build with version 4.0.3 not working #46

Closed paulstelzer closed 1 year ago

paulstelzer commented 1 year ago

After updating the android libraries the project is not building on android

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

KirstenStake commented 1 year ago

same issue here. did you manage to solve at all @paulstelzer

paulstelzer commented 1 year ago

I am still using 4.0.0-beta.1 until the dependency issue is fixed. If it will not be fixed, I will fork it.

Nodonisko commented 1 year ago

Honestly guys IDK how to fix this Android dependency hell and I also don't have env with Java 17 so it's hard for me to test it. Feel free to open PR.

One more thing you can try is to add something like this googleAndroidPlayReviewVersion=2.0.1 into your gradle.properties you may try to play with version until it doesn't conflict. Every dependency this library has is using these variables so you can literally change every single version, here you can find their names and default values (build.gradle):

ext {
    junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
    androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
    androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
    androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
    googleAndroidPlayCoreVersion = project.hasProperty('googleAndroidPlayCoreVersion') ? rootProject.ext.googleAndroidPlayCoreVersion : '1.10.3'
    googleAndroidPlayReviewVersion = project.hasProperty('googleAndroidPlayReviewVersion') ? rootProject.ext.googleAndroidPlayReviewVersion : '2.0.1'
}

PS: googleAndroidPlayCoreVersion is probably unused now, it should be safe to remove it completely (I will do that later)

klaurtar commented 1 year ago

@paulstelzer How did you solve this issue? I cannot get it to work. Assistance is needed!

harsh-verma-jtg commented 11 months ago

Is there any update regarding how we can successfully generate android build with Java 17?