audax
06/17/2025, 8:54 AMimport kotlin.jvm.JvmStatic
data class ExampleThingy(
val items: List<ItemThingy>,
) {
companion object {
@JvmStatic
val EXAMPLE = ExampleThingy(
items = listOf(
ItemThingy("1"),
ItemThingy("2"),
)
)
}
}
data class ItemThingy(
val id: String
)
In the java module, which imports the shared module, I have the following code:
var exampleList = ExampleThingy.getEXAMPLE().getItems();
var thingy = new ExampleThingy(exampleList);
This compiles without warnings, but the IDE shows an error:
Unknown class: 'java.util.List<com.example.demo_kmp_java.ItemThingy>'
There I can't get any IDE assistance in the Java Code.
Why does this happen and can I fix it? Sadly I have to work with the strict rule of "no Kotlin in the backend, not even a single file", but of course my backend needs to access stuff from my shared module.audax
06/17/2025, 9:21 AMaudax
06/17/2025, 11:41 AMaudax
06/17/2025, 12:29 PM