Hi, I've created my project with the https://kmp.jetbrains.com/ wizard with Android iOS and Desktop targets. I've noticed that the desktop target, declared by
jvm("desktop")
in the Gradle file, does not have access to the JVM classes. By default there is directory
desktopMain
in my module and it does not have access to JVM classes. It only works once I rename the directory to
jvmMain
, but then the project won't build as it looks for the
desktopMain
directory for
actual
declarations. How do I fix this setup? The whole point of the KMP desktop app for me is that it is a JVM application awkward monkey
t
tapchicoma
02/04/2025, 8:32 PM
> it does not have access to JVM classes
WDYM by this? 🤔
b
buszi0809
02/04/2025, 8:34 PM
like f.e.
java.net.InetAddress
is not found, the whole
java
package is unresolved
t
tapchicoma
02/04/2025, 8:36 PM
could you share your project?
b
buszi0809
02/04/2025, 8:38 PM
Okay, it seems it is actually Fleet issue, opened the project with latest Android Studio and it works mind blown
👍 1
buszi0809
02/04/2025, 8:45 PM
now things get even more interesting, it seems that the issue was that I'm using JDK installed with Homebrew, when switched from
OpenJDK 17.0.14
installed with Homebrew to
jbr-17 17.0.11
I guess available through Intellij, it magically started to work 🤔
buszi0809
02/04/2025, 8:45 PM
I will check with Fleet folks what do they think about that, thanks for responding at least 😄