AndroidStudio gradle 编译发现阿里云镜像找不到对应jar包https://maven.aliyun.com/nexus/content/repositories/jcenter


FAILURE: Build completed with 4 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:javaPreCompileDebug'.
> Could not resolve all files for configuration ':app:debugCompileClasspath'.
   > Could not find LiteAVSDK_TRTC-9.2.10641.jar (com.tencent.liteav:LiteAVSDK_TRTC:9.2.10641).
     Searched in the following locations:
         https://maven.aliyun.com/nexus/content/repositories/jcenter/com/tencent/liteav/LiteAVSDK_TRTC/9.2.10641/LiteAVSDK_TRTC-9.2.10641.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find LiteAVSDK_TRTC-9.2.10641.jar (com.tencent.liteav:LiteAVSDK_TRTC:9.2.10641).
     Searched in the following locations:
         https://maven.aliyun.com/nexus/content/repositories/jcenter/com/tencent/liteav/LiteAVSDK_TRTC/9.2.10641/LiteAVSDK_TRTC-9.2.10641.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find LiteAVSDK_TRTC-9.2.10641.jar (com.tencent.liteav:LiteAVSDK_TRTC:9.2.10641).
     Searched in the following locations:
         https://maven.aliyun.com/nexus/content/repositories/jcenter/com/tencent/liteav/LiteAVSDK_TRTC/9.2.10641/LiteAVSDK_TRTC-9.2.10641.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

4: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find LiteAVSDK_TRTC-9.2.10641.jar (com.tencent.liteav:LiteAVSDK_TRTC:9.2.10641).
     Searched in the following locations:
         https://maven.aliyun.com/nexus/content/repositories/jcenter/com/tencent/liteav/LiteAVSDK_TRTC/9.2.10641/LiteAVSDK_TRTC-9.2.10641.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 3s
18 actionable tasks: 10 executed, 8 up-to-date
 

看到返回阿里云仓库地址找不到的同学不用担心了,这类问题大家都可以在我们的.gradle文件文件夹中修改,这是因为您的.gradle文件夹中init.gradle文件使用的阿里云远程仓库都是久地址原因,打开看看咱们的init.gradle文件看看:

我这里的ALIYUN_REPOSITORY_URL和ALIYUN_JCENTER_URL都是老的阿里云仓库,如果同学问我怎么知道是老仓库,咱们可以看看阿里云的仓库服务已经把所有阿里云仓库新老地址给咱们了对应修改一下就OK了:仓库服务https://developer.aliyun.com/mvn/guide

如果还是阿里云镜像拉取失败你再看看你的init.gradle文件是否缺失mavenCentral()

  我这里都按对应阿里云仓库修改了,完美解决!

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值