Kotlin package imports don't work. "error: unresolved reference"

Problem description:
Can’t add kotlin packages, keep getting:

main.kt:1:12: error: unresolved reference:

Expected behavior:
for it to work and be able to use it

Actual behavior:
unresolved reference

Steps to reproduce:
add a kotlin package, I added “import com.google.gson.Gson”
then import it: import com.google.gson.Gson

Bug appears at this link:


chrome on Apple M1 Pro

1 Like

I figured this out. The run command doesn’t include imported packages. The compile and run should be similar to the java one. Let me suggest a fix

Well done @AliOlfat I spent some time looking into it yesterday and couldn’t resolve either. It would be really useful if you could post your solution here for others in case they have the same issue in the future.