android引用第三方插件时提示Could not find ***.aar解决办法

当Syns Project with Gradle Files是,系统提示失败,具体提示如下:

Failed to resolve: SwipeDelMenuLayout
Affected Modules:模块1,模块2,...

当Debug项目时系统提示,不能找到项目文件,具体提示如下:

Could not resolve all files for configuration 项目.
   > Could not find SwipeDelMenuLayout.aar (com.github.mcxtzhang:SwipeDelMenuLayout:V1.3.0).
     Searched in the following locations:
      https://jitpack.io/com/github/mcxtzhang/SwipeDelMenuLayout/V1.3.0/SwipeDelMenuLayout-V1.3.0.aar
Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

根据提示信息发现查询连接无法下载该文件:https://jitpack.io/com/github/mcxtzhang/SwipeDelMenuLayout/V1.3.0/SwipeDelMenuLayout-V1.3.0.aar

提示构建失败,具体如下:

切换到版本V1.2.5https://jitpack.io/com/github/mcxtzhang/SwipeDelMenuLayout/V1.2.5/SwipeDelMenuLayout-V1.2.5.aar时自动下载,说明V1.2.5版本异常,无法自动同步下载。

对于该问题解决方式有两种:

1.修改Android studio的Gradle的同步方式为离线,拷贝一份已下载的V1.3.0(该版本可能存在问题不建议使用)到C:/用户/用户名/.Gradle/caches/modules-2/files-2.1文件夹下面,重新构建项目即可;

2.修改项目中引用的SwipeDelMenuLayout版本为V1.2.5即可,在Gradle文件中修改引用文件,

implementation 'com.github.mcxtzhang:SwipeDelMenuLayout:V1.2.5';
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值