开发中出现:
Android dependency ‘com.android.support:recyclerview-v7’ has different version for the compile (28.0.0-alpha3) and runtime (28.0.0) classpath. You should manually set the same version via DependencyResolution
主要是依赖包中版本不对;解决方法:
allprojects {
repositories {
google()
jcenter()
}
//加入这句
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "28.0.0"
}
}
}
}