Android Studio Chipmunk更新后Gradle同步失败:无法找到com.android.tools.build:gradle:7.2.0解决方案求助
Fixing "Could not find com.android.tools.build:gradle:7.2.0" in Android Studio Chipmunk
Let’s work through targeted fixes for this issue, since the auto-fix prompt isn’t responding for you:
1. Align Gradle Wrapper version with the plugin
Gradle Plugin 7.2.0 requires Gradle 7.3.3 to function correctly. An outdated wrapper can block sync:
- Open
gradle/wrapper/gradle-wrapper.properties - Update the
distributionUrlline to:distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
2. Confirm centralized repository setup in settings.gradle
Android Studio Chipmunk uses a centralized repo config in settings.gradle that overrides project-level repos. Make sure it includes Google’s Maven repo:
dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() // Prioritize Google's repo by placing it first mavenCentral() } } rootProject.name = "YourProjectName" include ':app'
3. Clear corrupted Gradle caches
Stale or corrupted cache files often cause sync failures:
- Go to File > Invalidate Caches...
- Check "Clear file system cache and local history"
- Click Invalidate and Restart to reboot Android Studio
You can also manually delete cache folders:
- Remove the
.gradlefolder in your project root - Delete the global
.gradlefolder atC:\Users\<YourUsername>\.gradle
4. Check network proxy settings
Proxy restrictions or misconfigurations can block access to Google’s Maven repo:
- Go to File > Settings > Appearance & Behavior > System Settings > HTTP Proxy
- Switch to "Auto-detect proxy settings" or verify your manual proxy details are correct
- Try switching to a different network (like a mobile hotspot) to rule out network-specific issues
5. Manual plugin installation (last resort)
If sync still can’t download the plugin, add it to your local Maven repo manually:
- Download the
gradle-7.2.0.pomandgradle-7.2.0.jarfiles from Google’s Maven repository - Create the folder path
C:\Users\<YourUsername>\.m2\repository\com\android\tools\build\gradle\7.2.0 - Place the downloaded files into this folder
- Re-sync your project
内容的提问来源于stack exchange,提问作者Hong
相关产品推荐
相关产品推荐

