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

Duplicate class a.a found in modules rpointcardsdk-partner-2.4.0.aar -> com.adyen.checkout:twint:5.6.0 #551

Open
naidu-ba1 opened this issue Nov 14, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@naidu-ba1
Copy link

naidu-ba1 commented Nov 14, 2024

We started migrating react native adyen in our project to latest version 2.4.1. While doing that we got below error.

Execution failed for task ':app:checkReleaseDuplicateClasses'. > A failure occurred while executing com.***.build.gradle.internal.tasks.CheckDuplicatesRunnable > Duplicate class a.a found in modules rpointcardsdk-partner-2.4.0.aar -> jetified-rpointcardsdk-partner-2.4.0-runtime (rpointcardsdk-partner-2.4.0.aar) and twint-5.6.0.aar -> jetified-twint-5.6.0-runtime (com.adyen.checkout:twint:5.6.0) Go to the documentation to learn how to Fix dependency resolution errors.

Android builds are impacted with this.

Solution tried:

Based on the suggestion given here Adyen/adyen-android#1767 (comment), we have tried to update com.adyen.checkout:drop-in to 5.7.0 in build.gradle. This fix worked fine for debug builds but threw below error for release builds.

ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /Users/runner/work/1/s//app/build/outputs/mapping/release/missing_rules.txt.ERROR: R8: Missing class com.adyen.checkout.card.CardBrand (referenced from: void com.adyenreactnativesdk.configuration.CardConfigurationParser.applyConfiguration(com.adyen.checkout.card.CardConfiguration$Builder) and 1 other context)Missing class com.adyen.checkout.card.CardType$Companion (referenced from: java.util.List com.adyenreactnativesdk.configuration.CardConfigurationParser.getSupportedCardTypes$adyen_react_native_release())Missing class com.adyen.checkout.card.CardType (referenced from: java.util.List com.adyenreactnativesdk.configuration.CardConfigurationParser.getSupportedCardTypes$adyen_react_native_release())Task :app:minifyReleaseWithR8 FAILED> Task :app:createBundleReleaseJsAndAssets_SentryUploadCleanUp SKIPPEDASM Instrumentation process wasn't able to resolve some classes, this means thatthe instrumented classes might contain corrupt stack frames. Make sure thedependencies that contain these classes are on the runtime or the providedclasspath. Otherwise, the jvm might fail to load the corrupt classes at runtimewhen running in a jvm environment like unit tests.Classes that weren't resolved:> com.google..gms.maps.model.Dot> com.google..gms.maps.model.Dash> com.google..gms.maps.model.ButtCap> com.google..gms.maps.model.RoundCap> com.google..gms.maps.model.SquareCap> com.google..gms.maps.model.LatLngBounds> com.google..gms.maps.model.BitmapDescriptor> com.mparticle.identity.MParticleUser> com.mparticle.identity.AliasRequest> com.facebook.react.bridge.ReadableMap-- 22 more classes --FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:minifyReleaseWithR8'.> A failure occurred while executing com.***.build.gradle.internal.tasks.R8Task$R8Runnable > Compilation failed to complete

We have also tried to exclude twint from our project, but that also didn't work.

implementation('com.adyen.checkout:drop-in:5.6.0') {     
// TODO: remove this when updating to 5.7.0    
exclude group: 'com.adyen.checkout', module: 'twint'
}

@naidu-ba1 naidu-ba1 added the bug report when a bug report is created label Nov 14, 2024
@descorp
Copy link
Contributor

descorp commented Nov 14, 2024

Hey @naidu-ba1

We have also tried to exclude twint from our project, but that also didn't work.

Have you done it on node_modules/@adyen/react-native/android/build.gradle ?

@naidu-ba1
Copy link
Author

I have tried this in our app build.gradle.

Now I have tried by adding it in react native adyen node module. This solved the error.

@descorp
Copy link
Contributor

descorp commented Nov 14, 2024

This solved the error.

Thanks for confirming! We will investigate further..

What are the steps to reproduce it?

@descorp descorp added bug Something isn't working and removed bug report when a bug report is created labels Nov 14, 2024
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

2 participants