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

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

    I had this problem too; and i resolved that in this way:

    configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '26.0.1'
            }
        }
      }
    }
    

    be careful my min SDk was 26 , you have to change it with yours!

提交回复
热议问题