我添加了一个库,它在构建应用程序时生成了这个错误:
Program type already present: com.nineoldandroids.animation.Animator图书馆是:
implementation 'net.steamcrafted:load-toast:1.0.12'我的等级是:
dependencies {
implementation 'com.specyci:residemenu:1.6+'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:6.5.0'
implementation 'com.karumi:dexter:5.0.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.10.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.13.0'
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:4.0.0'
implementation "com.orhanobut:hawk:2.0.1"
implementation 'com.lusfold.spinnerloading:library:1.0.0'
implementation 'com.github.AndroidDeveloperLB:AutoFitTextView:4'
implementation 'com.github.GrenderG:Toasty:1.3.0'
implementation 'net.steamcrafted:load-toast:1.0.12'
implementation('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.13.0') {
transitive = true
}
implementation 'io.nlopez.smartlocation:rx:3.3.3'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'}
当我删除这个库时,我的应用程序将成功地构建并运行--这个库的问题是什么?是什么导致了这场冲突?
发布于 2018-11-02 21:18:27
这个问题通常来自命名冲突,在您的例子中是com.nineoldandroids库,其他库可能正在使用它。
只需将此排除添加到库中即可:
implementation 'net.steamcrafted:load-toast:1.0.12'{
exclude group: 'com.nineoldandroids'
}https://stackoverflow.com/questions/53125814
复制相似问题