Android Error: Attribute meta-data#android.support.VERSION@value value=(26.0.0),导入依赖包不兼容

我前两天遇见了个问题,公司为了满足需求,更换了融云的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'
            }
        }
    }
}

这样就解决了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值