Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/ResultPrinter

I'm trying to compile my Android project in Android Studio 0.3.0. Today I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/ResultPrinter at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:188) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113) Caused by: java.lang.ClassNotFoundException: junit.textui.ResultPrinter at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) ... 3 more  Process finished with exit code 1 

Doing some web searches leads me to believe this issue is somehow related to JUnit. However, I'm not using JUnit in my project. Maybe I've inadvertently turned on some option? In that case, how do I disable unit testing in my project? Any ideas?

like image 852
Janne Oksanen Avatar asked Oct 22 '13 11:10

Janne Oksanen


1 Answers

Finally found it. It's in the Run/Debug Configurations dialog. Disabled JUnit and it compiles again.

like image 90
Janne Oksanen Avatar answered Oct 25 '22 07:10

Janne Oksanen