SuddenH4X / awesome-app-rating

An Android library providing a dialog, which asks the user to rate the app or give feedback. You can also use the library to show the Google in-app review easily under certain conditions.
Apache License 2.0
231 stars 40 forks source link

2.5.0 build problem #81

Closed ryust closed 2 years ago

ryust commented 2 years ago

Building with 2.5.0 results in duplicate class error. Version 2.4.0 has no issues.

Duplicate class com.google.android.play.core.common.IntentSenderForResultStarter found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-core-common-2.0.0-runtime (com.google.android.play:core-common:2.0.0)

SuddenH4X commented 2 years ago

Hi @ryust,

Thanks for your message! I will look into the issue this weekend.

Best regards, Sascha

SuddenH4X commented 2 years ago

Hi @ryust,

you have to add android.enableJetifier=true to your gradle.properties file. I do not use the old support libraries directly but the Google review dependency does:

com.google.android.play:review-ktx:2.0.0 -> com.google.android.gms:play-services-basement:16.0.1 -> com.android.support:support-v4:26.1.0

ryust commented 2 years ago

That's not the problem... I already had (and still do) android.enableJetifier=true in the build.

I suspect your library is trying to pull in other libraries I already have in my build. Can you instead just list what libraries that are needed instead of pulling them in with yours?

ryust commented 2 years ago

Duplicate class com.google.android.play.core.common.IntentSenderForResultStarter found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) 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.10.3-runtime (com.google.android.play:core:1.10.3) 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.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-core-common-2.0.0-runtime (com.google.android.play:core-common:2.0.0) Duplicate class com.google.android.play.core.ktx.ReviewManagerKtxKt found in modules jetified-core-ktx-1.8.1-runtime (com.google.android.play:core-ktx:1.8.1) and jetified-review-ktx-2.0.0-runtime (com.google.android.play:review-ktx:2.0.0) Duplicate class com.google.android.play.core.ktx.ReviewManagerKtxKt$requestReview$1 found in modules jetified-core-ktx-1.8.1-runtime (com.google.android.play:core-ktx:1.8.1) and jetified-review-ktx-2.0.0-runtime (com.google.android.play:review-ktx:2.0.0) Duplicate class com.google.android.play.core.listener.StateUpdatedListener found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) 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.ReviewException found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0) Duplicate class com.google.android.play.core.review.ReviewInfo found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) 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.10.3-runtime (com.google.android.play:core:1.10.3) 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.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0) Duplicate class com.google.android.play.core.review.model.ReviewErrorCode found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0) Duplicate class com.google.android.play.core.review.model.zza found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) 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.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0) Duplicate class com.google.android.play.core.review.zza found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0) Duplicate class com.google.android.play.core.review.zzb found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0) Duplicate class com.google.android.play.core.review.zzc found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0) Duplicate class com.google.android.play.core.review.zzd found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0) Duplicate class com.google.android.play.core.review.zze found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0) Duplicate class com.google.android.play.core.review.zzf found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0) Duplicate class com.google.android.play.core.review.zzg found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0) Duplicate class com.google.android.play.core.review.zzh found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0) Duplicate class com.google.android.play.core.review.zzi found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0)

SuddenH4X commented 2 years ago

I've got a similiar error when I disabled jetifier so that seemed to be the solution. I won't remove necessary dependencies from the library, this is just not the way to go.

If I take a closer look on your error message I would guess that you have to use the new separated play-core dependencies instead of the deprecated one (more information on https://developer.android.com/guide/playcore).

Alternatively you can also exclude the problematic dependencies from this library or you just use the previous version.

ryust commented 2 years ago

I'll just use the previous version until someday I find an alternative. Thanks!