Android dependency 'com.android.support:support-v4' has different version for the compile (23.4.0) a

xiaoxiao2021-02-28  5

> Android dependency 'com.android.support:support-v4' has different version for the compile (23.4.0) and runtime (27.1.0) classpath. You should manually set the same version via DependencyResolution

Android dependency 'com.android.support:support-support-v4' has different version for the compile (23.1.1) and runtime (27.1.0) classpath. You should manually set the same version via DependencyResolution. 1

这是引用了不同版本的v4包造成的。 如果知道是哪个,一般用下面这个方法就可以

implementation("XXXXX") { exclude group: 'com.android.support', module: 'support-compat' } 123

如果实在是不知道哪个Library引用的,可以用下面这个方法,放在project 的build.gradle 下

subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support' && !details.requested.name.contains('multidex') ) { details.useVersion '27.1.0'//改这个版本号到你想要的版本 } } } } 12345678910

具体位置示例

buildscript { dependencies { } } allprojects { repositories { jcenter() maven { url "https://jitpack.io" } mavenCentral() maven { url 'https://maven.google.com' } google() } } subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support' && !details.requested.name.contains('multidex') ) { details.useVersion '27.1.0' } } } } 12345678910111213141516171819202122232425 转载。 https://blog.csdn.net/z19980115/article/details/79805144
转载请注明原文地址: https://www.6miu.com/read-1750184.html

最新回复(0)