Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Duplicate class found in modules jetified-tink-1.8.0 and jetified-tink-android-1.8.0 #731

Closed
shubhpilot opened this issue Feb 28, 2024 · 1 comment

Comments

@shubhpilot
Copy link

Hello, on my Kotlin Project, I am using androidx.security:security-crypto-ktx library for EncryptedSharedPreference. Now I have to use com.google.crypto.tink:apps-paymentmethodtoken library.

When I am trying to use these both together, I am getting this error for all the files inside tink-android module.

Caused by: java.lang.RuntimeException: Duplicate class com.google.crypto.tink.AccessesPartialKey found in modules jetified-tink-1.8.0 (com.google.crypto.tink:tink:1.8.0) and jetified-tink-android-1.8.0 (com.google.crypto.tink:tink-android:1.8.0)

I have tried updating both the libraries to their latest version but the issue still persists.

I have also tried excluding the module from the library like this

exclude(group = "com.google.crypto.tink", module = "tink-android")

but when I do this with androidx-security library then I get class not found exception with EncryptedSharedPreference's file.
And excluding with tink:apps-paymentmethodtoken library doesn't work either.

Any idea how can I resolve this? I have to use both the libraries.

@shubhpilot
Copy link
Author

Resolved. I had to use exclude(group = "com.google.crypto.tink", module = "tink") with tink library.

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

No branches or pull requests

1 participant