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

Android Studio无法解析com.chauthai.swipereveallayout:1.4.1依赖求助

解决Failed to resolve: com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.1问题
  • 检查仓库配置
    该库托管在JCenter(目前为只读状态,但仍可获取已有资源),请确认你的项目已配置对应仓库:

    • 若使用Android Studio Arctic Fox及以上版本(依赖配置在settings.gradle),打开项目根目录的settings.gradle,确保dependencyResolutionManagement块内包含以下仓库:
      dependencyResolutionManagement {
          repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
          repositories {
              google()
              mavenCentral()
              jcenter() // 必须添加这行
          }
      }
      rootProject.name = "JustWork"
      include ':app'
      
    • 若使用旧版Android Studio(依赖配置在项目级build.gradle),打开根目录的build.gradle,在allprojects的repositories中加入jcenter():
      allprojects {
          repositories {
              google()
              mavenCentral()
              jcenter()
          }
      }
      
  • 同步并重建项目

    1. 点击Android Studio右上角的「Sync Project with Gradle Files」按钮同步依赖
    2. 依次执行Build > Clean Project和Build > Rebuild Project
  • 备选方案:本地引入模块
    如果仓库访问仍异常,可直接引入源码模块:

    1. 从仓库下载源码包,解压后将swipe-reveal-layout文件夹复制到项目根目录
    2. 在settings.gradle中添加include ':swipe-reveal-layout'
    3. 将模块级build.gradle中的原依赖替换为:
      implementation project(':swipe-reveal-layout')
      
    4. 同步项目即可使用

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.05 03:40:16