我试图在IntelliJ中运行Kotlin scratch file,就像运行Java scratch文件一样,但它不起作用.
I created a new Kotlin scratch file, but can't run the code even after attempting the following:
- 创建一个
main
函数,并在里面打印一些内容. - 在主函数之外打印带有
println
的内容. - Create a
class
with amain
function inside andprintln
something.
当我创建一个新的kotlin项目时,该项目运行良好.
如屏幕截图所示,允许您运行kotlin代码的图标不会显示在编辑器窗口的左侧: