最近在执行gradlew build命令时,总是出现如下bug,虽然不影响编译运行。但是作为一个严谨的人一定要查到原因
* What went wrong:
Execution failed for task ':app:lint'.
> Could not resolve all files for configuration ':app:lintClassPath'.
> Could not download groovy-all.jar (org.codehaus.groovy:groovy-all:2.4.15)
> Could not get resource 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
> Could not GET 'https://d29vzk4ow07wi7.cloudfront.net/51d6c4e71782e85674239189499854359d380fb75e1a703756e3aaa5b98a5af0?response-content-disposition=attachment%3Bfilename%3D%
22groovy-all-2.4.15.jar%22&Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHAqOi8vZDI5dnprNG93MDd3aTcuY2xvdWRmcm9udC5uZXQvNTFkNmM0ZTcxNzgyZTg1Njc0MjM5MTg5NDk5ODU0MzU5ZDM4MGZiNzVlMWE3M
DM3NTZlM2FhYTViOThhNWFmMD9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPWF0dGFjaG1lbnQlM0JmaWxlbmFtZSUzRCUyMmdyb292eS1hbGwtMi40LjE1LmphciUyMiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVw
b2NoVGltZSI6MTU3MzgwNzcyOH0sIklwQWRkcmVzcyI6eyJBV1M6U291cmNlSXAiOiIwLjAuMC4wLzAifX19XX0_&Signature=a9L-oUM4SLwlquJ2iKilDhp1k2vlG5QM--OJXwXoiAO1E9WQXsV3Sj6CNNng1MV67cS63yFEzcZuiRCY7frK
iDMu3KEB8Tu~xCh7lpNIZp65XaqOM8hXUtAgPxSRuguEphhyhwEOeI55eFeUVI3u1Ub9JWV2-1oqQv0axsgJ2gwa1yplSnrYuqsnVkR~kCiNQ5RyhhefLJiCBl163~zLwrFeHMDbxJOyxHBWOSroSl2wLeX~PBV8F8-tQLc05Z16xu6tP67pbc7
CZx7pDCiu0VhzEYo8euVP3fZODkCP55Y5ympllUO669CXz4QTyUAxgk8KzWI6DxNKYJfdlVdtew__&Key-Pair-Id=APKAIFKFWOMXM2UMTSFA'.
> Remote host closed connection during handshake
* 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.
百度了下,几个都是说设置lintOption,我试了下没卵用。还有说设置maven库的。都没用。不得不说百度真没用,好多问题都找不到好的解释,越查越乱。
最后当然是解决了,很明显吗,问题是获取这个groovy-all:2.4.15失败了,为什么失败呢?我猜是gradle - 5.1.1的bug。网站上能下载下来,但是构建的时候就是不行。那我就下载下来放目录下吧
{3AB2F6E2-8558-4A81-9746-6EB25D44D0A2}_20191115170223.jpg
放了后运行还是一样的错误,特么的。
我看了下gradle4.10.1的目录,咦?这个下面是有的。好吧,那我降下gradle版本吧,然后就行了。
网友评论