Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle wrapper NoClassDefFoundError

Tags:

When I run ./gradlew I get

Exception in thread "main" java.lang.NoClassDefFoundError: org/gradle/wrapper/GradleWrapperMain Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

My project compiles using the Android Studio but stopped compiling from command line

like image 251
Gal Bracha Avatar asked Sep 04 '14 16:09

Gal Bracha


1 Answers

Probably something went bad. The solution:

  1. Install gradle: brew install gradle
  2. Regenerate wrapper: gradle wrapper
like image 110
Gal Bracha Avatar answered Oct 01 '22 20:10

Gal Bracha