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

2023-05-16


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()

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

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

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

随机推荐