I just created a Kotlin project for the first time ever (its the Java timed robot template, converted to Kotlin using the Kotlin for FRC extension) and I’m getting this error:
Update: in the build.grade file, I changed kotlin.jvm version from 1.8.0 to 1.6.0 and ran build again. It said build successful in 2 minutes, which is reassuring, but the same error is still there…
I ran into this with a project of my own. I haven’t found a solution, but I think that the issue is with the fwcd VS Code extension. If the build is successful but the intellisense isn’t, that suggests that it’s actually an issue with the JDK instance that’s running the language server. I thought it might be related to this issue but setting the kotlin home to the same place as java home didn’t seem to resolve the issue.
When you changed the kotlin jvm version, it forced it to rebuild all files, which is why it said 2 minutes instead of 2 seconds. If you’re building and nothing changed, gradle won’t regenerate the files, so it finishes quickly.
UPDATE: It appears that this issue is related. Until they tag a new release, there’s not much that can be done short of building the language server yourself.
I restarted the language server while the version in build.gradle was 1.6.0, and it worked perfectly - thank you! Guess I’m staying with that version for now.