版权声明:本文为博主原创文章,转载请标明出处。 https://blog.csdn.net/chaoyu168/article/details/60868487
解决办法:删除掉 ~/.gradle/wrapper/dists/ 下的文件夹,重新运行即可
参考内容:
The solution that worked for me
I had the luxury of comparing differences with working projects. That is how I discovered the error was due to the distributionUrl
property in the gradle/wrapper/gradle-wrapper.properties
file.
In the failing project this was set like distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
. While in the working project this was distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip
. Note the difference in the version.
Updating this distributionUrl in gradle-wrapper.properties to this 1.11 link solved the issue for me.