可以使用此配置解决各种依赖问题,统一版本,如解决support lib问题:
`
//解决冲突 同一版本
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion ANDROID_SUPPORT_LIB_VERSION
}
}
}
}
`