且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

找不到gradlew命令?

更新时间:2023-09-18 16:14:10

需要构建Gradle包装器。尝试运行 gradle wrapper --gradle-version 2.13 请记住将2.13更改为您的gradle版本号。运行此命令后,您应该会看到新的脚本添加到您的项目文件夹中。你应该可以用 ./ gradlew build 来运行包装来构建你的代码。有关更多信息,请参阅此指南 https://spring.io/guides/gs/gradle/


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"

I did my research, I have jdk, and I did sudo apt-get install gradle. I am totally clueless

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/.