Android dependency 'com.android.support:recyclerview-v7' has different version for the compile

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lvwenbo0107/article/details/83381758

Error:Execution failed for task ':app:preDebugBuild'.
> Android dependency 'com.android.support:recyclerview-v7' has different version for the compile (25.3.1) and runtime (25.4.0) classpath. You should manually set the same version via DependencyResolution

最外层项目的build.gradle

subprojects {
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.android.support'
                    && !details.requested.name.contains('multidex') ) {
                //统一版本号
                details.useVersion "25.4.0"
            }
        }
    }
}

猜你喜欢

转载自blog.csdn.net/lvwenbo0107/article/details/83381758