https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
compose-desktop
  • l

    Lucas

    09/24/2022, 5:44 PM
    Plugin [id: 'org.jetbrains.compose', version: 'v1.2.0-beta01', apply: false] was not found in any of the following sources:
    Google
    Gradle Central Plugin Repository
    MavenRepo
    maven(<https://maven.pkg.jetbrains.space/public/p/compose/dev>)
    maven2(<https://plugins.gradle.org/m2/>)
    What am i doing wrong?
    j
    e
    i
    • 4
    • 9
  • m

    Michael Paus

    09/25/2022, 7:30 PM
    I don’t know whether this is related to your specific problem but I would not recommend such an old version of the JDK. At that time there were still many bugs in the packager. I’d at least use JDK 17.
    a
    e
    • 3
    • 3
  • m

    Mitchell Syer

    09/26/2022, 6:35 PM
    I've made one for my application here https://github.com/Suwayomi/Tachidesk-JUI/blob/master/ui-core/src/desktopMain/kotlin/ca/gosyer/jui/uicore/components/DesktopScrollbar.kt#L105
    a
    s
    • 3
    • 3
  • e

    enighma

    09/27/2022, 7:02 PM
    Should it be possible to pass data from one window to another? My use-case: I open a new window from another and I pass data into the composable that hosts the window. However, when that data changes I get an AWT error:
    java.awt.IllegalComponentStateException: The window is showing on screen
    I'm guessing that compose tries to create a new window and AWT says it's already there, but all I want is the data to be passed.
    d
    d
    • 3
    • 21
  • f

    Francesco Pedron

    09/28/2022, 10:12 AM
    Hi, is there any comprehensive documentation on how to configure Wix on a compose desktop (windows only) project? What I need to do is to embed Visual C++ Redistributable in my installer and get it installed before my application is run. Thanks
    m
    • 2
    • 5
  • m

    mikehearn

    09/28/2022, 4:48 PM
    Is it possible for the main UI thread to re-enter the render loop such that events are filtered out and the window is still drawable, as it is in some other toolkits? e.g. if you have a call from a third party library that you want to call, which is normally very fast but might potentially block for a long time, inside a composition and therefore you might want to temporarily suspend the UI (or e.g. draw a spinner somewhere on it)? Let's assume for the sake of argument that no, this library can't be run in a separate thread or anything - it has to be on the main UI thread. Alternatively I guess, maybe you could detect that the library might block, throw an exception to abort the entire composition, do the thing, then re-run the composition process and exploit the fact that it's meant to be a pure function. Are there sufficient APIs for this and if so, does anyone know where they may be documented?
  • l

    Landry Norris

    09/28/2022, 8:33 PM
    This is a bug in the Android Gradle Plugin that went with Chipmunk (7.2.x). You have to use Android Studio Dolphin (7.3.x) or higher for now.
    k
    • 2
    • 3
  • m

    mikehearn

    09/29/2022, 8:15 AM
    📦 Hello! Of the previous 30 questions in this channel about a quarter of them are related to distribution. Kotlin+Compose Multiplatform is a great alternative to building web apps for the many cases where browsers just get in the way, but even with the useful built-in Gradle tasks we face problems like implementing custom software update systems, the need for multi-platform CI, wrangling certificates, manual icon conversions etc. Yesterday the Compose docs were updated to mention Conveyor, a new packaging tool that solves these problems. It doesn't depend on any central servers or app stores, so it can be used for both internal and consumer apps. Our long term goal is to enable web-like features such as SSO, code streaming, instant updates and sandboxing but for JVM apps, so that browsers have some proper competition outside of mobile. Compose is a really exciting technology and hopefully this will help it grow. The updated docs have a feature comparison to help you figure out if it's worth upgrading from the Gradle tasks. Feel free to message me with questions.
  • c

    Casey Brooks

    09/29/2022, 3:53 PM
    Does anyone have an IntelliJ plugin published with Compose UI in it? I’m wondering how I can get it working on all OSs, since the shared base hasn’t been updated in a while and doesn’t support the latest versions of IntelliJ
    i
    s
    a
    • 4
    • 8
  • e

    enighma

    09/29/2022, 8:00 PM
    Linux related issue Update 2 If I create a deb and install it, it works fine. Still curious why I can't just run the jar. I'm guessing something gets packaged that is not built into it. Update 1 I was able to run it by calling sudo:
    sudo java -jar <jar>
    The weird issue now is that it opens the window but does not render anything into it. Again, if I start it from IJ it works fine. Old If compile/run the project from IJ it works fine, but if I
    packageUberJarForCurrentOs
    and run it with
    java -jar <jar>
    I get the following error:
    libskiko-linux-x64.so: libGL.so.1: cannot open shared object file: No such file or directory
    What I don't understand is why running it from IJ would yield a different result. Anyone have had this issue?
  • c

    corneil

    09/29/2022, 9:37 PM
    The native library is installed into a specific location when you install the deb. Then code that tries to load it works as expected
    e
    • 2
    • 2
  • c

    czuckie

    09/29/2022, 10:03 PM
    extra info: The .desktop file has all the correct information in, and the launcher shows the correct icon (when you hit the super key and get to type in an app you want to run)
    j
    e
    m
    • 4
    • 11
  • z

    zt

    09/30/2022, 1:18 AM
    I'm trying to run the packageReleaseDeb task but it fails with this error
    Error: Invalid or unsupported type: [deb]
    . Same with rpm. I'm developing on linux so shouldn't it be working?
    e
    • 2
    • 17
  • m

    Michael Paus

    09/30/2022, 9:57 AM
    I have all my resources in a common folder and it works. You have to place your icon in
    commonMain/resources/drawable/icon.png
    .
    l
    a
    • 3
    • 2
  • z

    zt

    09/30/2022, 1:06 PM
    How could I make a component where I can hover the cursor over the edges then click and drag to resize it?
  • j

    Javier

    09/30/2022, 3:17 PM
    The current workaround is not very pretty https://kotlinlang.slack.com/archives/C01D6HTPATV/p1661289186038749?thread_ts=1661263687.854829&amp;cid=C01D6HTPATV
    i
    • 2
    • 1
  • o

    orangy

    09/30/2022, 3:49 PM
    I’m observing weird behavior with
    BasicTextField
    and focus. As if there are two nested components, but I don’t create any, it’s just
    BasicTextField
    with some styling and interaction tracking. When I hit tab (or request focus) the
    interactionSource
    receives
    FocusInteraction.Focus
    , but the caret is not visible. When I hit tab second time, the caret appears. Any ideas?
    i
    • 2
    • 2
  • e

    eygraber

    09/30/2022, 6:28 PM
    Does 1.2.0-beta02 support Kotlin 1.7.20?
    i
    • 2
    • 1
  • z

    zt

    10/01/2022, 1:34 AM
    Is there any sample project using the decompose library, or any other library to get a modern app architecture?
    m
    x
    a
    • 4
    • 3
  • z

    zt

    10/01/2022, 2:51 AM
    I noticed that the
    compose.desktop.currentOs
    implementation pulls in a material 2 dependency. This can get kind of annoying when using the material 3 dependency as well, with two different variants of the same component. I tried excluding the dependency which does make development easier but trying to build then fails. I think that it would probably be a lot better if the desktop dependency didn't depend on material 2, so problems like this wouldn't occur
  • p

    PHondogo

    10/02/2022, 6:57 PM
    Hello! How to show file choosing dialog using Jetpack Compose and handle file choosen event? Multiplatform solution needed - for desktop, Android, web.
    m
    • 2
    • 1
  • a

    adte

    10/03/2022, 9:27 PM
    Is there a roadmap of what JB employees are working on?
    k
    • 2
    • 1
  • m

    Michael Paus

    10/04/2022, 9:23 AM
    Have you tried using
    .pointerInput(Unit) {
        detectTransformGestures { centroid, pan, zoom, rotation -> 
           ...
        }
    }
    instead of fiddling directly with the AWT events? And in addition to that
    .pointerInput(Unit) {
        awaitPointerEventScope {
            while (true) {
                val event = awaitPointerEvent()
                ...
            }
        }
    }
    o
    d
    +2
    • 5
    • 7
  • a

    Arjan van Wieringen

    10/04/2022, 4:34 PM
    Why do I standard have a top and bottom padding on a Button? The minimal example here is:
    fun main() = singleWindowApplication(
        title = "Foo",
        state = WindowState(size = DpSize(1280.dp, 800.dp))
    ) {
        Button(onClick = {}) {
           Text("Foo")
        }
    }
    I get a top margin. When I bottom align I get a bottom margin. It doesn't matter if I change
    contentPadding
    or padding on any modifier. When I use a Card I don't get a padding.
    k
    • 2
    • 1
  • h

    hfhbd

    10/05/2022, 6:31 AM
    And 1.2.0-beta03 is out 🎉
  • h

    hfhbd

    10/05/2022, 6:50 AM
    Anybody using Jetbrains Compose on Android with 1.2.0-beta02/beta03 and getting this error too:
    e: androidx.compose.compiler.plugins.kotlin.IncompatibleComposeRuntimeVersionException: The Compose Compiler requires the Compose Runtime to be on the class path, but none could be found. The compose compiler plugin you are using (version 1.3.2) expects a minimum runtime version of 1.0.0.
    But I have it on the classpath:
    dependencies {
        implementation(compose.runtime)
    g
    l
    • 3
    • 4
  • g

    Guilherme Delgado

    10/05/2022, 11:50 AM
    Hello, I’m having a strange stack trace in a KMM project (Android, iOS, Desktop):
    > Task :desktopApp:run
    Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Module with the Main dispatcher is missing. Add dependency providing the Main dispatcher, e.g. 'kotlinx-coroutines-android' and ensure it has the same version as 'kotlinx-coroutines-core'
    ...
    Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@71435f82, Dispatchers.Main[missing]]
    Exception in thread "main" org.koin.core.error.InstanceCreationException: Could not create instance for [Factory:'com.expressus.domain.viewModels.ExpressusViewModel']
            at org.koin.core.instance.InstanceFactory.create(InstanceFactory.kt:61)
            at org.koin.core.instance.FactoryInstanceFactory.get(FactoryInstanceFactory.kt:38)
            at org.koin.core.registry.InstanceRegistry.resolveInstance$koin_core(InstanceRegistry.kt:111)
            at org.koin.core.scope.Scope.resolveValue(Scope.kt:237)
            at org.koin.core.scope.Scope.resolveInstance(Scope.kt:224)
            at org.koin.core.scope.Scope.get(Scope.kt:205)
    But it only throws in desktop. More in 🧵
    j
    l
    • 3
    • 6
  • k

    Kirill Grouchnikov

    10/05/2022, 2:57 PM
    Version 1.2.0-beta03 seems to work fine with Kotlin 1.7.20 on desktop. It hasn’t been officially published yet. Looks like there are some issues with the android and web targets.
    l
    i
    • 3
    • 2
  • j

    Jakob K

    10/05/2022, 3:47 PM
    In the past compose-jb worked just fine on a Linux server with software rendering and all relevant skiko jars on the classpath. With the recent versions though it fails to load libskiko for Linux with
    java.lang.UnsatisfiedLinkError: /.skiko/somelonghash/libskiko-linux-x64.so: libGL.so.1: cannot open shared object file: No such file or directory
    Also why does it search at some path on the system itself now instead of first looking if this library exists on the Java classpath? What could be causing this issue, what has changed here and how can I fix it?
    i
    • 2
    • 14
  • c

    czuckie

    10/05/2022, 3:52 PM
    Is there any off the shelf multiline text components for compose desktop?
    e
    • 2
    • 3
Powered by Linen
Title
c

czuckie

10/05/2022, 3:52 PM
Is there any off the shelf multiline text components for compose desktop?
e

enighma

10/06/2022, 1:13 AM
Text
supports multiline
There's alos
TextField
if you want to be able to edit the text.
c

czuckie

10/06/2022, 7:56 AM
Cheers Andreas, I was hoping there was some multiline editable text composable I was unaware off, since TextField behaves slightly unexpectedly in my limited use of it. Things like pressing Home taking you to the beginning of the field rather than the beginning of the line, and tab characters showing up as boxes.
View count: 13