Tink is a multi-language, cross-platform, open source library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse.
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
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.
Hello, on my Kotlin Project, I am using
androidx.security:security-crypto-ktx
library for EncryptedSharedPreference. Now I have to usecom.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.