库版本报错 all com.android.support libraries must use the exact same version specification(mixing

在app build.gradle中添加:

configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == ‘com.android.support’) {
if (!requested.name.startsWith(“multidex”)) {
details.useVersion ‘需要需改的版本号例如25.3.1’
}
}
}
}

点赞