java4android 33,java - 迁移到AndroidX-“程序类型已存在:android.support.v4.media.MediaBrowserCompat - 堆栈内存溢出...

我正在迁移到androidX并被此异常阻止。

AGPBI: {"kind":"error","text":"Program type already present:

android.support.v4.media.MediaBrowserCompat$ConnectionCallback$StubApi21",

"sources":[{}],"tool":"D8"}

这就是我应用程序的依存关系的样子,

dependencies {

implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.adobe.mobile:adobeMobileLibrary:4.17.2'

implementation 'androidx.appcompat:appcompat:1.1.0'

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

implementation 'androidx.legacy:legacy-support-v4:1.0.0'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"

implementation 'androidx.cardview:cardview:1.0.0'

implementation 'androidx.recyclerview:recyclerview:1.0.0'

implementation 'androidx.browser:browser:1.0.0'

implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'

implementation 'androidx.lifecycle:lifecycle-common-java8:2.1.0'

implementation 'com.jakewharton.timber:timber:4.5.1'

implementation "com.squareup.retrofit2:retrofit:${retrofitLibraryVersion}"

implementation "com.squareup.retrofit2:converter-gson:${retrofitLibraryVersion}"

implementation "com.squareup.retrofit2:adapter-rxjava2:${retrofitLibraryVersion}"

implementation "com.squareup.okhttp3:logging-interceptor:${okHttpLibraryVersion}"

implementation 'com.google.code.gson:gson:2.8.5'

implementation 'io.reactivex.rxjava2:rxjava:2.1.5'

implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'

implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

implementation 'com.github.bumptech.glide:glide:3.8.0'

implementation "org.bouncycastle:bcprov-jdk15on:${bouncyCastleVersion}"

implementation 'com.jakewharton:butterknife:8.8.1'

annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

implementation 'com.google.dagger:dagger:2.10'

implementation 'com.airbnb.android:lottie:2.7.0'

annotationProcessor 'com.google.dagger:dagger-compiler:2.10'

implementation 'com.airbnb.android:lottie:2.7.0'

implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'

implementation 'com.google.firebase:firebase-core:16.0.7'

implementation "com.google.firebase:firebase-messaging:17.4.0"

implementation 'com.scottyab:rootbeer-lib:0.0.7'

testImplementation 'junit:junit:4.12'

testImplementation 'org.mockito:mockito-core:2.7.5'

testImplementation "com.squareup.okhttp3:mockwebserver:${okHttpLibraryVersion}"

testImplementation 'commons-codec:commons-codec:1.11'

testImplementation 'pl.pragmatists:JUnitParams:1.1.1'

androidTestImplementation 'org.apache.commons:commons-lang3:3.5'

androidTestImplementation('androidx.test:runner:1.1.0') {

exclude group: 'com.android.support', module: 'support-annotations'

}

androidTestImplementation('androidx.test:rules:1.1.0') {

exclude group: 'com.android.support', module: 'support-annotations'

}

androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {

exclude group: 'com.android.support', module: 'support-annotations'

})

androidTestImplementation('androidx.test.espresso:espresso-intents:3.1.0', {

exclude group: 'com.android.support', module: 'support-annotations'

})

androidTestImplementation('androidx.test.espresso:espresso-contrib:3.1.0', {

exclude group: 'com.android.support', module: 'support-annotations'

exclude group: 'com.android.support', module: 'support-v4'

exclude group: 'com.android.support', module: 'appcompat-v7'

exclude group: 'com.android.support', module: 'design'

exclude group: 'com.android.support', module: 'recyclerview-v7'

})

androidTestImplementation 'org.mockito:mockito-core:2.7.5'

androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.2.0'

androidTestImplementation "com.squareup.okhttp3:mockwebserver:${okHttpLibraryVersion}"

}

我已经尝试像下面这样排除此模块,

exclude group: 'com.android.support', module: 'support-media-compat'

真的不确定,因为这样可能会破坏运行时的功能。

任何建议,将不胜感激。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值