0

I am very new to android or java and I am trying to get a HalloWorld to display on my android tablet. I have installed the JDK7 and then the full AndroidStudio package. I also have enabled the debugging mode on my tablet (it is recognized under the 6: Android menu in AS). When I create a simple new project it automatically creates the code for a HalloWorld. However, when I hit "run" button, I get the following error log and nothing happens on my tablet screen:

Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/ResultPrinter
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:191)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:116)
Caused by: java.lang.ClassNotFoundException: junit.textui.ResultPrinter
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 3 more

Process finished with exit code 1

Any idea what I should do to fix this? Thanks for any suggestion!

Kagaratsch
  • 963
  • 8
  • 18
  • possible duplicate of [Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/ResultPrinter](http://stackoverflow.com/questions/19516289/exception-in-thread-main-java-lang-noclassdeffounderror-junit-textui-resultpr) – Jared Burrows Mar 15 '15 at 03:04
  • It does look like the link you cite concerns the same problem, but the "answer" given there is rather confusing. It tells me to disable the junit under Run->Edit Configurations... Even though I do find a junit tab there, I do not see any check box to disable it, or similar. Can you clarify this for me? – Kagaratsch Mar 15 '15 at 03:14
  • Ok, i'm not sure what i did, but somehow i got it to work having messed around with Run->Edit Configurations... long enough. – Kagaratsch Mar 15 '15 at 03:20
  • Hey! congrats! Either add your specific steps as an answer or this is just a duplicated question. – Jared Burrows Mar 15 '15 at 03:58
  • Oh, my question is definitely a duplicate! The link you provided helped me resolve the issue. Thank you! – Kagaratsch Mar 15 '15 at 04:07

0 Answers0