androidgradleandroid-jetifier

Duplicate class a.a found in modules jetified android


I am using two libraries in my app 1 aar and another gradle dependency. I am getting this error on building release build

Duplicate class a.a found in modules jetified-android-sdk-1.7.26-runtime (com.cashfree.pg:android-sdk:1.7.26) and jetified-adsdk-AN-1.15.16-runtime (adsdk-AN-1.15.16.aar)

This is my build gradle app level

implementation 'com.cashfree.pg:android-sdk:1.7.26'
implementation files('libs/adsdk-AN-1.15.16.aar')

//Dependencies used by all payment modes
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.android.volley:volley:1.1.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'

Not able to understand this a.a class


Solution

  • The issue was due to proguard rules of the SDK Add below rules to SDK proguard and it worked then

    -repackageclasses 'com.example'
    -allowaccessmodification
    -useuniqueclassmembernames
    -keeppackagenames doNotKeepAThing