Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kotlin, unresolved reference on everything in VSCode

I installed Kotlin plugins for VSCode and created Hello World file test.kt but VSCode shows errors (it could be compiled via command line)

enter image description here

like image 612
Alex Craft Avatar asked May 10 '19 18:05

Alex Craft


People also ask

Can kotlin run on VSCode?

Kotlin IDE for Visual Studio Code To use, make sure that JDK 11+ is installed and open a Kotlin file inside a Gradle or Maven project. Support for Kotlin source files with a standalone compiler ( kotlinc ) is experimental. The language server will then automatically launch in the background.


2 Answers

if you have the first extension (kotlin by fwcd), Uninstall it and install the second I mean by mathiasfrohlich.

enter image description here

like image 74
Sana Ebadi Avatar answered Sep 18 '22 19:09

Sana Ebadi


I had this issue when I had both the Kotlin Language by mathiasfrohlich and Kotlin by fwcd extensions installed.

Uninstalling Kotlin by fwcd resolved the problem in my case.

like image 45
Ryan Stewart Avatar answered Sep 18 '22 19:09

Ryan Stewart