https://kotlinlang.org logo
Join Slack
Powered by
# compose-desktop
  • l

    LurkyVAR

    05/23/2025, 1:31 PM
    Hello , I'd like to figure out a question. When a Compose Multiplatform project that doesn't use any third-party libraries is compiled to the JVM, does the resulting Java executable depend on CPU instruction set-specific libraries — similar to how Skia or JavaFX require separate builds for aarch64 and amd64 platforms? Or can it simply run on any less common instruction set platform as long as there's a sufficiently recent OpenJDK available? Thanks
    m
    e
    • 3
    • 6
  • o

    Olivier Patry

    05/23/2025, 4:39 PM
    Is it possible to UI test Window's Menu ?
    Copy code
    onNodeWithText("Tools").assertIsDisplayed()
    This fails ("Tools" being one of the MenuBar's root Menu). I'm running on macOS if that matters (given how the macOS menu are managed vs app Window, it could) (See code in thread 🧵)
    a
    • 2
    • 4
  • r

    ron

    05/25/2025, 8:46 AM
    I am working (together witg gemini from google) a kmp app. we arte trying to remove an element from a mutablelist. according to the kotln documentation
    val removed = _bloodPressureRecords.removeIf { it.id == id }
    should work, but accroding to intellij, removeIf does not exist kotlin = "2.1.21", kotlinx-coroutines = "1.10.2", ktor = "3.1.3"
    s
    • 2
    • 4
  • p

    Pablo

    05/25/2025, 6:26 PM
    I updated android studio to last version, and now I'm getting this error on Android Studio start:
    Plugin 'Compose Multiplatform for Desktop IDE Support' is not compatible with the IDE because the IDE contains module 'com.jetbrains.kmm' which conflicts with the plugin
    any idea why this happenned and how can this be solved without breaking compose desktop capabilites on Android Studio?
    z
    • 2
    • 4
  • p

    Pablo

    05/27/2025, 6:21 AM
    Do "Kotlin Multiplatform Shared Module Template" affect Compose Desktop? On the documentation and the announcements, they talk only about Android - iOS relationship with shared module. They don't explain how to apply it for doing Android - Desktop apps. Should whe continue doing it like until now? The last desktop app I did was a 4-5 months ago, following the documentation of compose desktop, and the new shared module template didn't exist.
  • l

    louiscad

    05/29/2025, 2:57 PM
    Will those "Non-Android source sets detected in …" - "Gradle source sets ignored: desktopMain, desktopTest." useless warnings go away one day. when using the Android plugin in IntelliJ IDEA? It's kinda distracting, for no reason since things still work fine.
    ✅ 1
    👀 4
    ➕ 3
    z
    • 2
    • 2
  • d

    dleuck

    05/30/2025, 7:52 AM
    In Compose for Desktop, what is the best way to display a Google doc? I know we can use the built-in Java WebView, but the aesthetics are... suboptimal. It doesn't look anything like a Google doc rendered in Chrome or Safari.
  • d

    dleuck

    05/30/2025, 1:13 PM
    Maybe JCEF? Has anyone been able to get JSEF working with Compose for Desktop on MacOS?
    today i learned 2
    k
    s
    • 3
    • 4
  • r

    rkechols

    05/31/2025, 1:42 AM
    I've been trying to package and submit a legacy Java/JavaFX app to the Apple App Store, and I'm running into an issue where Apple's "Transporter" says I need to submit a bundle that supports both x86_64 and arm64 in one. I know Compose Desktop Gradle build tools can make a signed PKG artifact (
    TargetFormat.PKG
    ) and notarize it. If I were to convert the legacy app as needed to use this build system, would the resulting PKG be correctly set up to work on both x86_64 and arm64 like Transporter wants?
    🚫 1
    m
    • 2
    • 3
  • j

    Jens van de Wiel

    05/31/2025, 3:40 PM
    Hello, what is a good idiomatic way to fetch data async and show a loading state?
    o
    a
    +3
    • 6
    • 13
  • p

    Pablo

    06/02/2025, 9:57 AM
    I created a new compose desktop project (for Android and Desktop) using the official web wizard, and something has chaned since 6 months ago I did my last project. Now there is a desktopDev folder. What is used for? can't find anything on google. Also, is there any updated desktop official documentation or tutorial? 6 months ago was hard to find the steps to build a desktop app. Now I'm trying to do an Android/Desktop app, and any updated tutorial will be very interesting. Almost every tutorial or documentation I'm finding is oriented to Android/iOS app, not Android/Desktop. For example, I don't see a androidMain folder, so where I must place the Android code? commonMain should be just for shared code between Android and Desktop, not for Android. If I place the Android code in commonMain, then, the expect/actual structure will not work, because it depends on placing the expect empty on commonMain.
    c
    • 2
    • 12
  • m

    Michael Paus

    06/02/2025, 4:23 PM
    Am I right to assume that the CMP Gradle task composeAppnotarizeReleaseDmg should automatically finish after some time? I am sitting in front of a terminal window for more than 1.5 hours now and I am still watching it counting seconds.
    a
    • 2
    • 3
  • g

    geepawhill

    06/03/2025, 3:26 PM
    Folks, I have what appears to be a Compose Desktop (Windows) bug to report. Where should I go to file it? If you want to check my work, the minimal reproducible is here: https://github.com/GeePawHill/mr-clip
    r
    a
    • 3
    • 10
  • y

    Yassine Abou

    06/06/2025, 4:52 AM
    I’m encountering an error when generating a release build of my desktop app:
    Could not create instance of:
    This seems tied to SQLDelight worker configuration
    Copy code
    single {
        val driver = JdbcSqliteDriver(JdbcSqliteDriver.IN_MEMORY)
    .also { LlmsDatabase.Schema.create(it) }
    .apply { enableForeignKeys() }
    LlmsDatabaseWrapper(driver, LlmsDatabase(driver))
    }
    This worked fine in debug builds but failed in release. What I Tried Following guidance from this Koin issue , I modified the code to use a persistent database with a cache directory:
    Copy code
    val appCacheDirectory = appCacheDirectory(appId = "org.yassineabou.llms", createDir = true)
    val driver = JdbcSqliteDriver(url = "jdbc:sqlite:$appCacheDirectory/LlmsDatabase.db", schema = LlmsDatabase.Schema).apply {
    enableForeignKeys()
    }
    LlmsDatabaseWrapper(driver, LlmsDatabase(driver))
    However, the error persists in release builds. For more information check out my repository: https://github.com/yassineAbou/LLMS
    a
    j
    • 3
    • 7
  • t

    Thomas

    06/06/2025, 7:43 PM
    When using compose 1.9.0-alpha02 I get the following error, did something go wrong with publishing?
    Copy code
    Could not find org.jetbrains.androidx.window:window-core-desktop:1.4.0-alpha07
    i
    • 2
    • 3
  • t

    Tingshu Fan

    06/07/2025, 1:52 AM
    Is there any maintainer willing to take a look at my issue? #8323
    • 1
    • 1
  • z

    Zoff

    06/07/2025, 9:12 AM
    is there a way a compose desktop app could NOT take the focus on startup? this is annoying and dangerous (sadly today most applications on desktop do this aweful thing) is there a setting for this? or could this be added to compose? i am sure you all had this happen. you open some app, and today all apps take an aweful long time to open, then you type into some editor or spreadsheet, and while typing the app you started some seconds ago suddenly starts and takes the focus forcefully. so now you continue typing into a different app. maybe you are typing a password. i bet may times a day people type passwords into microsoft teams this way. any info appreciated
    👀 1
  • b

    Big Chungus

    06/07/2025, 3:29 PM
    Is there some experimental option I can enable to have cfd app use wayland on linux? X11 default looks like shit under fractional scaling unfortunately.
  • j

    John O'Reilly

    06/08/2025, 5:02 PM
    Updating a project here to CMP 1.9.0-alpha02 and now getting following when I run Compose for Desktop app....anyone else come across this?
    ➕ 1
    c
    • 2
    • 2
  • m

    Mateusz Łuczak

    06/10/2025, 4:31 PM
    Hi, is there a convenient way to view logs and errors from the console without using Android Logcat? I'm having trouble running my Compose Desktop app using the "Run MainKt" button in Android Studio — it doesn't start properly. However, it compiles and runs fine from the command line using:
    Copy code
    ./gradlew :composeApp:run
    The issue is that when I run it this way, I lose the ability to easily check for errors or debug output within Android Studio.
    • 1
    • 1
  • a

    albrechtroehm

    06/18/2025, 10:34 AM
    Hey, is anyone aware of this issue? Since i tried to updated my kmp project to compose:1.8.2 and try to packageDmg the app i realized that there is an issue. The packages app was not starting anymore. When running
    runDistributable
    i received the following error: IllegalAccessError: class androidx.compose.ui.node.NodeChain tried to access private field androidx.compose.runtime.collection.MutableVector.content (details thread). Going back to
    1.7.3
    or jumping ahead to
    1.9.0-alpha02
    made the issue disappear. Edit: Forgot to mention that running it with the
    run
    task worked always fine with every compose version
    a
    • 2
    • 9
  • t

    Trejkaz

    06/19/2025, 3:44 PM
    waitForIdle()
    seems oddly flaky if the last thing that happened was a dialog appearing or disappearing. I had an
    assertExists()
    fail to find the thing, but then find it a moment later when it tried with
    useUnmergedTree = true
    - and no, it was in the merged tree too.
    a
    • 2
    • 25
  • s

    Samuel

    06/21/2025, 4:30 AM
    How do I run desktop configuration from Android Studio? https://www.jetbrains.com/help/kotlin-multiplatform-dev/quickstart.html#run-the-sample-apps I've tried these 7 different approaches (all of which are valid destinations on my filesystem with the .kt extension removed): •
    desktopRun -DmainClass=io.github.samuelmarks.off_on_ml.MainActivity --quiet
    •
    desktopRun -DmainClass=<http://io.github.samuelmarks.off_on_ml.App|io.github.samuelmarks.off_on_ml.App> --quiet
    •
    desktopRun -DmainClass=io.github.samuelmarks.off_on_ml.Greeting --quiet
    •
    desktopRun -DmainClass=io.github.samuelmarks.off_on_ml.Platform --quiet
    •
    desktopRun -DmainClass=io.github.samuelmarks.off_on_ml.Platform.jvm --quiet
    •
    desktopRun -DmainClass=io.github.samuelmarks.off_on_ml.main --quiet
    •
    desktopRun -DmainClass=io.github.samuelmarks.off_on_ml --quiet
    s
    j
    +3
    • 6
    • 13
  • r

    rnett

    06/22/2025, 12:46 AM
    Hey folks, is JBR still de-facto required for the best compose desktop experience? And if so, is there any possibility of getting the JBR releases to track closer to the latest JDK versions (i.e. 24)?
    a
    s
    • 3
    • 8
  • a

    abraham

    06/24/2025, 2:45 PM
    can someone point me to the right resource to find out how to make a custom text selection toolbar for compose desktop? There seems to be a way on devices that use touch instead of a mouse by implementing a custom
    TextToolbar
    but that doesn't seem to work on desktop. To be fair I couldn't find much documentation about that either.
    a
    • 2
    • 2
  • s

    sunbreak

    06/25/2025, 6:01 AM
    Hi everyone! Our team got some issues when using JetBrains
    @Preview
    for our internal projects. Tried to find source code of
    Kotlin Multiplatform
    IDEA plugin, but found source code of
    Compose Multiplatform for Desktop IDE Support
    IDEA plugin • Any doc for how
    Kotlin Multiplatform
    IDEA plugin works on
    @Preview
    ? • Any chance for implementing
    @Preview
    on Android/iOS project via
    Compose Multiplatform for Desktop IDE Support
    IDEA plugin? > Have tried to add
    CommonPreview
    for IDEA plugin, which works for commonMain when project have desktop target: https://github.com/Sunbreak/compose-multiplatform/commit/ddd9071117ec0b4db95fff270b654d8a13aaa6aa Slack Conversation
  • s

    sunbreak

    06/25/2025, 6:04 AM
    FYI: preview commonMain via desktop plugin on Linux/Windows, when
    Koltin Multiplatform
    IDEA plugin 0.9 is unavailable
  • a

    abraham

    06/25/2025, 5:58 PM
    Hi, how would you go about using platform calls in compose-desktop? I was looking for something similar to iOS and use expect / actual to call some mac framework or windows / linux stuff, is that at all possible?
    👌 1
    a
    g
    s
    • 4
    • 12
  • s

    stepango

    06/27/2025, 7:24 PM
    Reposting this message here. Does anyone running Compose on remote Desktop? :)
    a
    • 2
    • 2
  • s

    Slackbot

    06/29/2025, 10:33 AM
    This message was deleted.
    s
    • 2
    • 1