我前两天遇见了个问题,公司为了满足需求,更换了融云的sdk,我就把demo从新的导入我的项目里面,本来想着轻轻松松就搞定了,结果给我报了这个问题
Error:
Attribute meta-data#android.support.VERSION@value value=(26.0.0) from [com.android.support:exifinterface:26.0.0] AndroidManifest.xml:25:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:23:9-25:38 to override.
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:processReleaseManifest’.
Manifest merger failed with multiple errors, see logs
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. -
Get more help at https://help.gradle.org
BUILD FAILED in 51s
愁的我一筹莫展,在网上搜这个问题的关键字之类的,都是说的啥啊,然后就有道一波,看着上面出现的不同版本,就想起了兼容问题,然后…
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.0.0'
}
}
}
}
这样就解决了