0

I'm using VSCode. I have the following in myApi.kt:

package com.mycompany.myproject.myapi

data class MyClass(
    val accountNumber: String,
    val state: String,
    val country: String
)

...and I have the following in myApp.java:

import com.mycompany.myproject.myapi.*;

MyClass myObject = new MyClass();

Compilation and execution are all fine. The only problem is VSCode gives me a red squigly underline beneath references to MyClass in the java file. Hovering over it, it says:

MyClass cannot be resolved to a type Java(16777218)

I have the Kotlin plug-in installed in VSCode.

How can I get VSCode to recognize this Kotlin class in my java file?

1

This is not yet supported based on this open issue

  • Much thanks, Barry. – Jonathan M Apr 15 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.