Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Execution failed for task ':app:checkLaunchDebugDuplicateClasses'. #85

Open
user97116 opened this issue Mar 21, 2023 · 4 comments
Open

Comments

@user97116
Copy link

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:checkLaunchDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
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.2-runtime (com.google.android.play:core-common:2.0.2)
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.2-runtime (com.google.android.play:core-common:2.0.2)
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.2-runtime (com.google.android.play:core-common:2.0.2)
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.2-runtime (com.google.android.play:core-common:2.0.2)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
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.1-runtime (com.google.android.play:review:2.0.1)
Go to the documentation to learn how to Fix dependency resolution errors.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 2m 12s
Exception: Gradle task assembleLaunchDebug failed with exit code 1
Exited (sigterm)

@yevgeniaronov
Copy link

i solved this issue by locking to 2.0.4, looks like this issue was introduced in 2.0.5.

@qwertyway
Copy link

Same issue for me. Solution from @yevgeniaronov worked, but I'd like to use latest version

@qwertyway
Copy link

Manged to resolve: I'm also having in-app update native android feature in the app. Managed to fix this problem by replacing build.gradle dependency
'com.google.android.play:core-ktx:1.8.1'
with
'com.google.android.play:app-update-ktx:2.1.0'

Now I can use in_app_review 2.0.9 without compilation error

@denghejun
Copy link

denghejun commented Jul 20, 2024

i solved this issue by locking to 2.0.4, looks like this issue was introduced in 2.0.5.

But then, you will get alert from google:

Update com.google.android.play

com.google.android.play:core has added this note for core:1.10.3:

Update your Play Core Maven dependency to an Android 14 compatible version! Your current Play Core 
library is incompatible with targetSdkVersion 34 (Android 14), which introduces a backwards-incompatible 
change to broadcast receivers to improve user security. As a reminder, from August 31, Google Play requires 
all new app releases to target Android 14. Update to the latest Play Core library version dependency to 
avoid app crashes: https://developer.android.com/guide/playcore#playcore-migration

You may not be able to release future versions of your app with this SDK version to production or open testing.


How did you fix this?

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

No branches or pull requests

5 participants
@qwertyway @denghejun @yevgeniaronov @user97116 and others