Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:22:5-2

来源:互联网 发布:js点击关闭弹出框 编辑:程序博客网 时间:2024/06/05 16:40
在引入第三方的包报了一个错 错误如下:
Attribute meta-data#android.support.VERSION@value value=(26.0.0-alpha1) from [com.android.support:cardview-v7:26.0.0-alpha1]   
        AndroidManifest.xml:24:9-38 is also present at [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31 value=(25.3.1).Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:22:5-24:41 to override.
在moudle的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.0'            }        }    }}

参考:http://blog.csdn.net/qq_33210042/article/details/75808292

阅读全文
0 0
原创粉丝点击