首先说明这个错误是突然毫无征兆的发生的,在上一个版本跑起来还挺正常,而报错无法编译之后,就尝试了clean project,无效;也尝试了删除对应的build目录和.ideal目录,也无效;后又尝试了invaliddate and restart,也是无效的。
然后回到看对应的错误日志,尝试寻找点蛛丝马迹:
What went wrong: Execution failed for task ':module:base:dataBindingMergeDependencyArtifactsXXXDebug'. > Could not resolve all files for configuration ':module:base:XXXDebugCompileClasspath'. > Could not find com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v8.3.0-release-jitpack. Required by: project :module:base > Could not find com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-armv7a:v8.3.0-release-jitpack. Required by: project :module:base > Could not find com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-arm64:v8.3.0-release-jitpack. Required by: project :module:base
这里面的日志明显的问题就是对应仓库的包没有下载下来,那么能不能切换到其他版本的依赖包尝试一下,然后就切换到
implementation 'com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer:v8.1.1'
然后同步一下gradle就正常了,原来引入的是8.3.0一直拉不下来依赖包,切换版本就正常了。
总结:
1,遇到gradle的问题,要多看看日志锁定原因
2,检查依赖包的配置是否正确,正确则尝试切换到多个不同版本进行验证
3,处理耗时久的问题都记录一下,下次规避
|