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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值