引入三方库兼容包版本不一致问题'com.android.support:recyclerview-v7' has different version for the compile

xiaoxiao2025-08-18  27

Error:Execution failed for task ':app:preDebugBuild'. > Android dependency 'com.android.support:recyclerview-v7' has different version for the compile (25.3.1) and runtime (25.4.0) classpath. You should manually set the same version via DependencyResolution

 

最外层项目的build.gradle {新增:三方库指定版本}

subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support' && !details.requested.name.contains('multidex') ) { //统一版本号 details.useVersion "25.3.1" } if(details.requested.group == 'com.google.code.gson'&&details.requested.name.startsWith("gson")) { details.useVersion "2.7" } } } }
转载请注明原文地址: https://www.6miu.com/read-5034986.html

最新回复(0)