程序类型已经存在:com.nineoldandroids.animation.Animator

时间:2018-11-02 21:04:59

标签: android

我添加了一个在尝试构建应用时生成此错误的库:

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'

}

当我删除该库时,我的应用程序将成功构建并运行 这个库有什么问题?和什么导致了这种冲突?

1 个答案:

答案 0 :(得分:2)

此问题通常是由于命名冲突(在您的情况下为com.nineoldandroids库,而其他库可能正在使用它)。

只需将此排除项添加到您的书架中:

implementation 'net.steamcrafted:load-toast:1.0.12'{
exclude group: 'com.nineoldandroids'
}