android studio - Could not find or load main class org.gradle.wrapper.GradleWrapperMain -
i cleaned whole project deleting local directories ~/.gradle
, ~/.m2
~./android
, ~/workspace/project/.gradle
, chosing file -> invalidate caches / restart...
in android studio. execution of command ./gradlew
leads following output:
usr$ ./gradlew tasks error: not find or load main class org.gradle.wrapper.gradlewrappermain
needless say, deleted much, question how can repaired again? have ideas how fix this?
gradlew
gradle wrapper executable - batch script on windows , shell script elsewhere. if include following lines in build.gradle
,
task wrapper(type: wrapper) { gradleversion = '2.0' }
a gradle wrapper script added source folders. wrapper script when invoked, downloads defined gradle version, , executes it. distributing wrapper project, can work without needing install gradle beforehand. better, users of build guaranteed use version of gradle build designed work with.
in deletions, deleted gradlew depends upon. can either pull gradlew files source repo, or if have gradle installed run gradle wrapper
restore it.
ref: gradle wrapper
Comments
Post a Comment