You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

升级support库至27.1.1后同步项目遇Failed to resolve: support-core-utils错误求助

Fixing "Failed to resolve: support-core-utils" After Upgrading to Support Library 27.1.1

Hey there, let's get that frustrating dependency error sorted out. When upgrading to support library 27.1.1, this error usually pops up because of repository configuration issues, mixed dependency versions, or cached data. Here's what you can try:

1. Confirm Google Maven Repository is properly set up

Starting from support library 27.0.0, all support library artifacts are hosted exclusively on the Google Maven Repository. While your project-level build file already includes google() before jcenter(), double-check these details:

  • The google() repository is listed first in both the buildscript and allprojects sections (this ensures Gradle checks Google's repo first for dependencies)
  • If your app-level build file has its own repositories block, add google() there too

2. Unify all support library versions

A common culprit is mixing different versions of Android Support Library dependencies. Every com.android.support: dependency in your app-level build file must use the same version (27.1.1 in your case). For example:

// Ensure all these match 27.1.1
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-core-utils:27.1.1'
implementation 'com.android.support:design:27.1.1'

If third-party libraries are pulling in older versions of support-core-utils, you can force Gradle to use your desired version by adding this to your app-level build file:

configurations.all {
    resolutionStrategy.force 'com.android.support:support-core-utils:27.1.1'
}

To identify exactly which library is causing the version conflict, run this command in your project root:

./gradlew app:dependencyInsight --dependency support-core-utils --configuration compile

3. Clean cached data and resync the project

Corrupted caches often mess up dependency resolution. Try these steps:

  • Go to File > Invalidate Caches / Restart in Android Studio, then select "Invalidate and Restart"
  • Manually delete the .gradle folders in your project root directory and your app module directory
  • Run ./gradlew clean from the terminal, then click "Sync Project with Gradle Files" in Android Studio

4. Check Gradle plugin compatibility

Your current Gradle plugin version (3.1.0) is compatible with support library 27.1.1, but if the above steps don't work, try upgrading the plugin to a slightly newer compatible version. Update your project-level build file's classpath:

classpath 'com.android.tools.build:gradle:3.2.1'

Make sure your Gradle wrapper version matches (update distributionUrl in gradle/wrapper/gradle-wrapper.properties to use Gradle 4.6 or higher, e.g., https\://services.gradle.org/distributions/gradle-4.6-all.zip)


内容的提问来源于stack exchange,提问作者Ali Zarei

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 08:46:05