https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
a

Andy Smith

02/27/2024, 12:48 PM
Hi All, I'm trying to create a KMM project using the wizard. ( I'm on arch linux). I seem to be able to create an android app that uses the emulator, but when I try to create a desktop app as well it doesn't seem to work. Anyone come across this?
j

Jeff Lockhart

02/27/2024, 4:11 PM
"doesn't seem to work" is a bit vague. If you shared the error you're experiencing and what you've tried, it'd be easier for someone to help.
👍 1
a

Andy Smith

02/27/2024, 6:00 PM
Fair comment!
Okay - steps basically create an app in the wizard selecting only desktop. ( Same problem occurs if other targets are specified, but this is to get the proverbial 'minimal complete example).. When the project is imported into Android studio, I try to run composeapp/src/desktopMain/kotlin/main.kt and get...
Copy code
Cannot locate tasks that match ':composeApp:compileJava' as task 'compileJava' not found in project ':composeApp'.
p

Pablichjenkov

02/27/2024, 6:04 PM
If you run kdoctor in your environment? - What kdoctor says?
You have the KMP or compose desktop plugin installed in Android Studio? - Not sure if kdoctor checks that?
a

Andy Smith

02/27/2024, 6:12 PM
Is kdoctor available on linux? The video I watched said kdoctor only avail on macos?
🚫 1
j

Jeff Lockhart

02/27/2024, 6:13 PM
Does the app run with
./gradlew :composeApp:run
?
☝️ 1
👍 1
j

Jacob Ras

02/27/2024, 6:15 PM
Easy on the "send to channel" option please 🙂 People also read the threads, don't worry.
a

Andy Smith

02/27/2024, 6:15 PM
@Jacob Ras A sorry - I'm a newb
👋 1
👍 1
@Jeff Lockhart Yes! That works!
j

Jeff Lockhart

02/27/2024, 6:16 PM
kdoctor is macOS only. But all you should need to compile and run a Compose Desktop app is a JDK installed.
👍 2
a

Andy Smith

02/27/2024, 6:17 PM
So I guess I could just create a run configureation which runs that gradle task and I'm all good.
👌 1
@Jeff Lockhart Thanks!
👍 1
p

Pablichjenkov

02/27/2024, 6:25 PM
Ah good to know. I didn't know kdoctor wasn't available on Linux or Windows
a

Andy Smith

02/27/2024, 11:44 PM
@Jacob Ras Thanks for your diplomatic patience with a newb 🙂
🤝 1
5 Views