2

我在 android studio 中有一个 R8 错误,错误相同:

Program type already present: androidx.recyclerview.widget.AdapterHelper$Callback

这是我的 gradle 依赖项:

dependencies {
implementation 'androidx.core:core:1.2.0-beta01'
implementation 'androidx.palette:palette:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.1.0-rc01'

compileOnly 'org.checkerframework:checker-qual:2.5.2'
compileOnly 'org.checkerframework:checker-compat-qual:2.5.0'
implementation 'com.google.firebase:firebase-messaging:20.0.0'
implementation 'com.google.firebase:firebase-config:19.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.android.gms:play-services-vision:16.2.0'
implementation 'com.google.android.gms:play-services-wallet:17.0.0'
implementation 'com.google.android.gms:play-services-wearable:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'net.hockeyapp.android:HockeySDK:5.2.0'
implementation 'com.googlecode.mp4parser:isoparser:1.0.6'
implementation 'com.stripe:stripe-android:2.0.2'
implementation 'com.google.android.material:material:+'
implementation files('libs/android-viewbadger.jar')
implementation 'com.android.support:multidex:+'}

我必须补充:

implementation 'com.google.android.material:material:+'

或者:

implementation 'com.android.support:design:+'

用于使用 TabLayout

但是当我添加那个实现时,我得到了那个错误。

4

1 回答 1

1

排除包:

implementation('com.google.android.material:material:+') {
    exclude group: 'androidx.recyclerview'
}
于 2020-01-12T13:39:51.913 回答