问题:
Attribute meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31 is also present at
原因:Manifest中的版本和library中引用的recyclerview版本不一样,需要在gradle中将其强制转换成相同的版本。
解决办法:
在Gradle(Module:APP)中最后面加上
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'
}
}
}
}
本文解决了一个常见的Android开发问题,即Manifest文件中的版本与使用的库版本不一致导致的冲突。通过在Gradle配置文件中设置统一的版本号来解决此问题。
4845

被折叠的 条评论
为什么被折叠?



