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

🐛  Build Error: DuplicateClasses #18

Open
mahdiqdi opened this issue Jun 29, 2023 · 5 comments
Open

🐛  Build Error: DuplicateClasses #18

mahdiqdi opened this issue Jun 29, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@mahdiqdi
Copy link

شرح باگ در پلاگین:

متن کامل خطا یا لاگ مرتبط به طور کامل:

FAILURE: Build failed with an exception.

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

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and jetified-kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and jetified-kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations$ReflectSdkVersion found in modules jetified-kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and jetified-kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
Duplicate class kotlin.jvm.jdk8.JvmRepeatableKt found in modules jetified-kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and jetified-kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
Duplicate class kotlin.random.jdk8.PlatformThreadLocalRandom found in modules jetified-kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and jetified-kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
Duplicate class kotlin.streams.jdk8.StreamsKt found in modules jetified-kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and jetified-kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$1 found in modules jetified-kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and jetified-kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$2 found in modules jetified-kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and jetified-kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$3 found in modules jetified-kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and jetified-kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$4 found in modules jetified-kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and jetified-kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
Duplicate class kotlin.text.jdk8.RegexExtensionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and jetified-kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
Duplicate class kotlin.time.jdk8.DurationConversionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and jetified-kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)

 Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.

نحوه‌ی تولید مجدد آن توسط تیم توسعه:

پکیج نیم برنامه‌: ``

اطلاعات اضافی که به حل مشکل کمک می‌کنند:

@mahdiqdi mahdiqdi added the bug Something isn't working label Jun 29, 2023
@mahdiqdi
Copy link
Author

لطفا این مورد رو بررسی کنید
نسخه ۲.۱.۰ این مشکل رو نداشت

@amirsamdev
Copy link

amirsamdev commented Jul 12, 2023

فلاتر

لطفا پیگیری کنید!!

@MortezaNedaei
Copy link
Member

لطفا نسخه کاتلین رو آپدیت کنید به 1.8.20. نسخه آخر تپسل از همین نسخه کاتلین استفاده میکنه. کش پروژه رو هم کلین کنید

@MortezaNedaei MortezaNedaei self-assigned this Sep 26, 2023
@MortezaNedaei MortezaNedaei changed the title 🐛  باگ: 🐛  Build Error: DuplicateClasses Sep 26, 2023
@ali2236
Copy link

ali2236 commented Feb 17, 2025

من هم مشکل مشابه‌ای دارم، اما به دلیل وجود com.android.vending.billing.IInAppBillingService در sdk تپسل:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkMyketDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class com.android.vending.billing.IInAppBillingService found in modules jetified-myket-billing-client-1.15.1-runtime (com.github.Almas-Studio:myket-billing-client:1.15.1) and jetified-tapsell-sdk-android-4.9.7-runtime (ir.tapsell.sdk:tapsell-sdk-android:4.9.7)
     Duplicate class com.android.vending.billing.IInAppBillingService$Default found in modules jetified-myket-billing-client-1.15.1-runtime (com.github.Almas-Studio:myket-billing-client:1.15.1) and jetified-tapsell-sdk-android-4.9.7-runtime (ir.tapsell.sdk:tapsell-sdk-android:4.9.7)
     Duplicate class com.android.vending.billing.IInAppBillingService$Stub found in modules jetified-myket-billing-client-1.15.1-runtime (com.github.Almas-Studio:myket-billing-client:1.15.1) and jetified-tapsell-sdk-android-4.9.7-runtime (ir.tapsell.sdk:tapsell-sdk-android:4.9.7)
     Duplicate class com.android.vending.billing.IInAppBillingService$Stub$Proxy found in modules jetified-myket-billing-client-1.15.1-runtime (com.github.Almas-Studio:myket-billing-client:1.15.1) and jetified-tapsell-sdk-android-4.9.7-runtime (ir.tapsell.sdk:tapsell-sdk-android:4.9.7)

این کلاس هم در myket-billing-client وجود دارد و هم sdk تپسل.
اضافه کردن exclude به شکل زیر، مشکل را حل نمی کند:

    implementation('com.github.Almas-Studio:myket-billing-client:1.15.1') {
        exclude group: 'com.android.vending.billing', module: 'IInAppBillingService'
    }

@MortezaNedaei
Copy link
Member

من هم مشکل مشابه‌ای دارم، اما به دلیل وجود com.android.vending.billing.IInAppBillingService در sdk تپسل:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkMyketDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class com.android.vending.billing.IInAppBillingService found in modules jetified-myket-billing-client-1.15.1-runtime (com.github.Almas-Studio:myket-billing-client:1.15.1) and jetified-tapsell-sdk-android-4.9.7-runtime (ir.tapsell.sdk:tapsell-sdk-android:4.9.7)
     Duplicate class com.android.vending.billing.IInAppBillingService$Default found in modules jetified-myket-billing-client-1.15.1-runtime (com.github.Almas-Studio:myket-billing-client:1.15.1) and jetified-tapsell-sdk-android-4.9.7-runtime (ir.tapsell.sdk:tapsell-sdk-android:4.9.7)
     Duplicate class com.android.vending.billing.IInAppBillingService$Stub found in modules jetified-myket-billing-client-1.15.1-runtime (com.github.Almas-Studio:myket-billing-client:1.15.1) and jetified-tapsell-sdk-android-4.9.7-runtime (ir.tapsell.sdk:tapsell-sdk-android:4.9.7)
     Duplicate class com.android.vending.billing.IInAppBillingService$Stub$Proxy found in modules jetified-myket-billing-client-1.15.1-runtime (com.github.Almas-Studio:myket-billing-client:1.15.1) and jetified-tapsell-sdk-android-4.9.7-runtime (ir.tapsell.sdk:tapsell-sdk-android:4.9.7)

این کلاس هم در myket-billing-client وجود دارد و هم sdk تپسل. اضافه کردن exclude به شکل زیر، مشکل را حل نمی کند:

    implementation('com.github.Almas-Studio:myket-billing-client:1.15.1') {
        exclude group: 'com.android.vending.billing', module: 'IInAppBillingService'
    }

این مشکل در نسخه‌ی 2.3.2 حل شده. لطفا تست کنید

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants