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

依赖解析失败求助:无法解析circleprogress:1.2.1及添加依赖即构建失败

Hey there, I’ve dealt with this exact type of dependency resolution failure plenty of times—especially with libraries hosted on GitHub. Let’s walk through the most effective fixes, since the standard clean/rebuild/invalidate cache steps didn’t work for you.

Key Solutions to Fix Dependency Resolution Failure

1. Verify You’ve Added the Correct Repository for GitHub Libraries

The com.github.lzyzsd:circleprogress library is hosted on Jitpack, so your root-level build.gradle file must include the Jitpack repository. Double-check that the repositories block looks like this:

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' } // This line is critical
    }
}

If you’re using Gradle 7.0+, the repository might need to be added in the settings.gradle file instead, under the dependencyResolutionManagement block.

2. Confirm the Dependency Version Exists

Sometimes typos in version numbers cause this error. Head to the library’s GitHub repository release page to make sure version 1.2.1 is actually published. If it’s not, switch to a valid released version.

3. Check Network/Proxy Settings

If you’re on a corporate network or using a proxy, it might be blocking access to Jitpack or other Maven repositories. Try these steps:

  • Disable any system-wide proxies temporarily and sync your project.
  • In Android Studio, go to File > Settings > Appearance & Behavior > System Settings > HTTP Proxy and make sure the proxy configuration is correct (or set it to "No proxy" to test).

4. Fix Project-Wide Repository Configuration

Since adding any dependency fails, your project’s repository setup is likely broken. Ensure your root build.gradle (or settings.gradle for newer Gradle versions) includes all required repositories: google(), mavenCentral(), and any third-party repos like Jitpack that you need.

5. Perform a Deep Cache Clean

The standard "Invalidate Caches / Restart" might not clear all corrupted cache files. Try this more thorough approach:

  • Close Android Studio.
  • Delete the .gradle folder in your project’s root directory.
  • Delete the build folder inside your app module.
  • Reopen Android Studio and sync your project with Gradle files.

内容的提问来源于stack exchange,提问作者Zia Ahmed

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.07 20:42:45