Skip to content

Instantly share code, notes, and snippets.

@eecarus
Created April 7, 2018 15:49
Show Gist options
  • Save eecarus/dd6e6e257127ae782e90f8fd5c2f350c to your computer and use it in GitHub Desktop.
Save eecarus/dd6e6e257127ae782e90f8fd5c2f350c to your computer and use it in GitHub Desktop.
A way to force all dependencies for android support to follow a single version (in this case 25.4.0) without using tools:replace.
// from https://stackoverflow.com/questions/43280871/android-getting-manifest-merger-failed-error-after-updating-to-a-new-version
// to force everything to use 25.4.0 instead of dealing with merge conflict on 26.1.0
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.4.0'
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment