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
- Createa new android application.
- Convert the main activity from Java to Kotlin automatically.
- Create a new android test module.
- Convert the generated Java file to Kotlin.
- Run.