I can't run a simplest Kotlin-js sample


#1

The code is simple:

fun main(args : Array<String>) {   println("Hello, world!") }

And I have configured it as a kotlin-javascript project.

But when I compile it, it reports error in the console:

Kotlin: Unresolved reference: println

I don't know where the problem is.

Following is my screenshot, it may provide much information.


#2

Try add import js.println and turn off Settings -> Compiler -> Use external build


#3

It works when I disabled "Use external build", thank you !

It seems “Settings -> Compiler -> Use external build” is a global setting. Do I have to enable it when I turn to another non-kotlin project?


#4

It's a project setting