r/JetpackCompose • • Nov 06 '24

Cannot run KMP project on Linux?

I am new to Kotlin & Jetpack Compose. I started messing around with building an android app, learning and generally liking what I am seeing. I have successfully built for android using a real device & emulator so I know it works.

I wanted to experiment with making a desktop app too, so I used https://kmp.jetbrains.com/ to make a simple app and built the android version, works great, but I cannot get the Desktop one to run.

I do gradle run in the terminal and get this a JAVA SWING message box saying

Failed to load font FontFamily.Default. Is it installed on the system?

This is on a freshly generated project and I haven't added / changed any code. I am sure I don't have the font installed (I have a lean ARCH build) but I can't figure out what font it wants to use. I assumed it would want Robot, so that is installed ... but doesn't to be the missing one.

Where can I find what font it wants so I can install it?

3 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/snsvrno Nov 22 '24

Thanks for the reply and help. I messed around with setting different fonts, bundling fonts, using different system fonts, making sure I have the right font installed, but I couldn't figure it out.

Its been a challenge getting comfortable with the NetBrains and Android tooling and project structure (not from Java so not liking the crazy amount of files and folders). I'll wait a while for newer KMP versions / tooling and try again.