Could not find or load main class org.gradle.wrapper.GradleWrapperMain解决办法


解决办法:

gradlew is the gradle wrapper executable - batch script on windows and shell script elsewhere. If you include the following lines in your build.gradle,

task wrapper(type: Wrapper) {
    gradleVersion = '2.0'
}

a gradle wrapper script is added to your source folders. The wrapper script when invoked, downloads the defined gradle version, and executes it. By distributing the wrapper with your project, anyone can work with it without needing to install Gradle beforehand. Even better, users of the build are guaranteed to use the version of Gradle that the build was designed to work with.

In your deletions, you deleted something that gradlew depends upon. You can either pull just the gradlew files from your source repo, or if you have gradle installed run gradle wrapper to restore it.

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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM