报错如下:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileAgentDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:agentDebugCompileClasspath'.
> Could not resolve com.youzanyun.open.mobile:x5sdk:6.4.25.
Required by:
project :app
> Could not resolve com.youzanyun.open.mobile:x5sdk:6.4.25.
> Could not get resource 'https://dl.bintray.com/youzanyun/maven/com/youzanyun/open/mobile/x5sdk/6.4.25/x5sdk-6.4.25.pom'.
> Could not GET 'https://dl.bintray.com/youzanyun/maven/com/youzanyun/open/mobile/x5sdk/6.4.25/x5sdk-6.4.25.pom'. Received status code 403 from server: Forbidden
> Could not resolve com.youzanyun.open.mobile:x5sdk:6.4.25.
> Could not get resource 'https://dl.bintray.com/umsdk/release/com/youzanyun/open/mobile/x5sdk/6.4.25/x5sdk-6.4.25.pom'.
> Could not GET 'https://dl.bintray.com/umsdk/release/com/youzanyun/open/mobile/x5sdk/6.4.25/x5sdk-6.4.25.pom'. Received status code 403 from server: Forbidden
* 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
BUILD FAILED in 15s
原因:
https://dl.bintray.com/ 仓库被墙了
新仓库地址:Search - Nexus Repository Manager (youzanyun.com)
很遗憾,6.4.25的版本找不到了,改成6.4.35版本(注意,升级到最新的7.1.16,初始化的接口都变了)
修改如下:
allprojects中
maven {url 'http://maven.youzanyun.com/repository/maven-releases/'}
dependencies中
implementation 'com.youzanyun.open.mobile:x5sdk:6.4.35'
顺便提下,如果用到了wechat-sdk-android-without-mta
maven{url "https://maven.aliyun.com/repository/google" }
maven{url "https://maven.aliyun.com/repository/public"}
implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.6.5'