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

前端 未结 22 1420
不知归路
不知归路 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:29

    Use

    implementation 'com.android.support:appcompat-v7:27.1.1'
    

    Don't use like

    implementation 'com.android.support:appcompat-v7:27.+'
    

    It may give you an error and don't use an older version than this.

    or event don't do like this

    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1' 
    

    etc... numbers of libraries and then

    implementation 'com.android.support:appcompat-v7:27.+'
    

    the same library but it has a different version, it can give you an error.

    0 讨论(0)
  • 2020-11-27 14:29

    I downgrade the support

    previously it was
    implementation 'com.android.support:appcompat-v7:27.0.2'
    

    Use it

    implementation 'com.android.support:appcompat-v7:27.1.0'
    
    implementation 'com.android.support:design:27.1.0'
    

    Its Working Happy Codng

    0 讨论(0)
  • 2020-11-27 14:30

    It might be cause of a library, I faced it because of Glide.

    It was

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

    So I added exclude group: "com.android.support" And it becomes

    implementation ('com.github.bumptech.glide:glide:4.7.1') {
            exclude group: "com.android.support"
        }
    
    0 讨论(0)
  • 2020-11-27 14:32

    I know it's a late answer but I had the same problem and my solution was just adding implementation 'com.android.support:design:28.0.0 or any above support design libraries !!

    0 讨论(0)
提交回复
热议问题