Error : Program type already present: android.support.design.widget.CoordinatorLayout$Behavior

前端 未结 22 1586
不知归路
不知归路 2020-11-27 14:04

I am getting the following error while building the project. haven\'t used CoordinatorLayout in this project. just added as a dependency in build.gradle :

I am usin

22条回答
  •  北海茫月
    2020-11-27 14:16

    The solution for this is that remove this following dependency:

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

    put general dependencies as:

    dependencies {
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        //noinspection GradleCompatible
        implementation 'com.android.support:appcompat-v7:27.1.1'
        implementation 'com.android.support:support-compat:26.1.0'
        implementation 'com.android.support:multidex:1.0.3'    
        implementation 'com.android.support:support-v4:26.1.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.facebook.android:audience-network-sdk:4.99.1'
    }
    

提交回复
热议问题