我是靠谱客的博主 欣慰西牛,这篇文章主要介绍gradlew build --- command not found 和 caused by:java.net.SocketTimeoutException:Read time out,现在分享给大家,希望可以做个参考。

问题:

I am working on a Java project with gradlew. I use Ubuntu Linux as my OS. When I run “gradle” it runs, and gives me info. But when I run “gradlew”, it outputs as “No command ‘gradlew’ found, did you mean: Command ‘gradle’ from package ‘gradle’ (universe) gradlew: command not found”

解决办法:

第一步:解决command not found
Gradle wrapper needs to be built. Try running gradle wrapper --gradle-version 2.13 Remember to change 2.13 to your gradle version number. After running this command, you should see new scripts added to your project folder. You should be able to run the wrapper with ./gradlew build to build your code. Please refer to this guid for more information https://spring.io/guides/gs/gradle/.
第二步:
继续执行 ./gradlew build 还超时,最后发现竟然是我的网络不好。

备注:
以为修改gradle-wrapper-properities文件中的 distributionUrl=https://services.gradle.org/distributions/gradle-6.4.1-bin.zip 为本地下载的路径,结果显示,还是从该网站下载,所以修改这个对我无用。

参考网站:

1、https://stackoverflow.com/questions/41700798/gradlew-command-not-found
2、下载gradle网址:https://pan.baidu.com/s/1IQubwEwIYfAhDMBS3vii-w

最后

以上就是欣慰西牛最近收集整理的关于gradlew build --- command not found 和 caused by:java.net.SocketTimeoutException:Read time out的全部内容,更多相关gradlew内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(118)

评论列表共有 0 条评论

立即
投稿
返回
顶部