从Android Studio运行Kotlin Koans测试
Windows 10,Android Studio 3.0。
所以我只是从master分支克隆Kotlin Koans回购,并试图用两种不同的方式运行测试:
1.使用IDE,当按下测试方法旁边的绿色箭头时,我看到:
Process finished with exit code 1 Class not found: "i_introduction._0_Hello_World.N00StartKtTest"Empty test suite.
2.当我尝试使用终端,如Kotlin Koans自述:
gradlew test --tests i_*
它给了我一个输出:
:compileKotlin Using kotlin incremental compilation Caught an exception trying to connect to Kotlin Daemon java.lang.ClassNotFoundException: com.sun.tools.javac.util.Context
我已经看到了很多的建议,可能在jdk文件夹中缺少tools.jar,我正在使用内部的Android Studio jdk,并在这里介绍。 我也尝试禁用gradle deamons – 结果仍然是一样的。