其他分享
首页 > 其他分享> > Gradle:Could not find or load main class org.gradle.wrapper.GradleWrapperMain

Gradle:Could not find or load main class org.gradle.wrapper.GradleWrapperMain

作者:互联网

执行报错:

./gradlew build -x test --stacktrace

报错信息:

Could not find or load main class org.gradle.wrapper.GradleWrapperMain

在这里插入图片描述
解决:
确定目录结构是否正常

├── build.gradle
├── gradle
│   └── wrapper
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle

对比后发现缺少gradle-wrapper.jar,下载后执行成功
下载路径;

http://www.java2s.com/Code/JarDownload/gradle-wrapper/gradle-wrapper.jar.zip

参考:

https://stackoverflow.com/questions/29805622/could-not-find-or-load-main-class-org-gradle-wrapper-gradlewrappermain

标签:load,GradleWrapperMain,Could,gradlew,jar,wrapper,gradle,find
来源: https://blog.csdn.net/u012551524/article/details/113784755