jetified android 模块中发现重复的 aa 类

WIS*_*SHY 4 android gradle android-jetifier

我在我的应用程序 1 aar 和另一个 gradle 依赖项中使用两个库。我在构建发布版本时遇到此错误

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)
Run Code Online (Sandbox Code Playgroud)

这是我的构建 gradle 应用程序级别

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'
Run Code Online (Sandbox Code Playgroud)

无法理解这a.a门课

WIS*_*SHY 5

该问题是由于 SDK 的 proguard 规则所致 将以下规则添加到 SDK proguard 然后就可以了

-repackageclasses 'com.example'
-allowaccessmodification
-useuniqueclassmembernames
-keeppackagenames doNotKeepAThing
Run Code Online (Sandbox Code Playgroud)