解决办法:
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