Android test module throws exception


#1

I got the following errors:

"C:Program FilesJavajdk1.7.0_05binjava" -ea -Didea.launcher.port=7534 "-Didea.launcher.bin.path=C:Program Files (x86)JetBrainsIntelliJ IDEA 122.639bin" -Dfile.encoding=UTF-8 -classpath "C:Program Files (x86)JetBrainsIntelliJ IDEA 122.639libidea_rt.jar;C:Program Files (x86)JetBrainsIntelliJ IDEA 122.639pluginsjunitlibjunit-rt.jar;C:Program Files (x86)Androidandroid-sdkplatformsandroid-8android.jar;C:Program Files (x86)Androidandroid-sdkplatformsandroid-8datares;C:Program Files (x86)Androidandroid-sdktoolssupportannotations.jar;C:UsersDodyDocumentsGitHubNutCaseoutproductiontests;C:UsersDodyDocumentsGitHubNutCaselibkotlin-runtime.jar" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 com.example.NutCase.MyActivityTest Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/ResultPrinter at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) 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: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:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 3 more

after performing the following tasks

  1. Createa new android application.
  2. Convert the main activity from Java to Kotlin automatically.
  3. Create a new android test module.
  4. Convert the generated Java file to Kotlin.
  5. Run.

#2

Please report bugs to the tracker. Thanks.


#3

http://youtrack.jetbrains.com/issue/KT-3054��