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
  • r

    rsktash

    08/26/2021, 8:35 AM
    Jetbrains compose is not using latest alpha version of compose foundation
    i
    m
    d
    • 4
    • 11
  • r

    rcd27

    08/26/2021, 1:08 PM
    I have an infinite flow of items, coming from the
    net
    , trying to subscribe to it from
    @Composable
    , but it seems to cancel the subscription coroutine, so connection is lost. I've tried with
    LaunchEffect(Unit)
    but no differences:
    var itemsListState by remember { mutableStateOf<List<LootItemViewObject>>(emptyList()) }
        val scope = rememberCoroutineScope()
        scope.launch {
            suggestedItemsRepository
                .subscribeForItem(qrCode)
                .collect {
                    itemsListState = it
                }
        }
    I think, I've missed one vital concept of recomposing, can you please help? This code is placed in
    @Composable
    which renders
    LazyColumn
    of those items. (it is later somehing like
    LazyColumn { itemsListState.forEach { item { ...} } }
    d
    j
    +2
    • 5
    • 9
  • d

    darkmoon_uk

    08/27/2021, 1:14 PM
    Any news on when the 'JB Compose' builds are going to incorporate the upstream fix for the crippling IDE bug with
    @Preview
    's, that means Android previews only show:
    The following classes could not be found:
    - androidx.compose.ui.tooling.preview.ComposeViewAdapter
    This bug originally affected Arctic Fox users for pure Android Dev; and could be resolved by forcing Gradle to resolve an older
    -beta09
    version of the
    ui-tooling
    dependency; however with JB's Multiplatform Compose, I can't get anything to work (including forcing by resolution strategy), the result is always duplicate class errors since both the JB and Android artifact end up somehow being included. I'm assuming the only practical resolution is to wait for the upstream fix to be merged-in, has anyone else worked around it?
    i
    • 2
    • 3
  • k

    Kirill Grouchnikov

    08/27/2021, 5:10 PM
    👀
    :blob-hype: 6
    🎉 5
    r
    • 2
    • 2
  • k

    Kirill Grouchnikov

    08/27/2021, 6:28 PM
    You gotta keep the streak of supporting the latest Kotlin version on desktop first
    j
    • 2
    • 1
  • s

    spierce7

    08/27/2021, 8:31 PM
    Is there any end in sight to Compose being tied to a specific Kotlin compiler version? I guess I’m wondering when the Kotlin compiler plugin API will be stable enough.
    d
    k
    • 3
    • 4
  • k

    Kirill Grouchnikov

    08/27/2021, 9:01 PM
    Something weird. Not sure if it is Kotlin 1.5.30 plugin, but after installing it, I had to migrate from IDEA CE 2020.2 to 2021.2. Otherwise it wouldn't load my projects
    d
    r
    • 3
    • 4
  • d

    darkmoon_uk

    08/28/2021, 11:04 AM
    How are devs with multiplatform Compose projects dealing with the current lack of
    @Preview
    . I'm a bit confused why there isn't more noise regarding it, because it means one of: a) nobody's using JB Compose to even notice (don't want to believe this one) or b) there's a workaround that I've missed or c) Devs are generally more patient than me and just quietly waiting until it works again ☺️?
    j
    • 2
    • 13
  • s

    sonder-joker

    08/29/2021, 7:46 AM
    How to restart application by writing kotlin's code?
    s
    • 2
    • 2
  • r

    rsktash

    08/29/2021, 7:23 PM
    has anybody have experience with skottie(lottie with ski) in Compose Desktop?
    👀 4
    d
    • 2
    • 3
  • p

    PHondogo

    08/31/2021, 7:59 AM
    Hello! When doing right click on a TextField application crashed with stacketrace in thread. It is happening on all text fields in app.
    a
    • 2
    • 3
  • r

    Rémy

    08/31/2021, 4:19 PM
    Hello, I have a weird “bug”. Actually, I develop a little app with IntelliJ, and Jetpack Compose Desktop on Windows 10 (VM running on macOS Host). The account name is “Rémy Lavergne”, and when I try to create a distribuable (for exemple), the build crashes... After some self researches, the path is clearly involved, because I have recreate a new windows user without space and special characters, and the build worked! Do you think I should fill an issue on compose-jb, or in other bug tracker (I mean like IntelliJ related) ?
    k
    t
    v
    • 4
    • 5
  • c

    Christian Babsek

    08/31/2021, 4:41 PM
    Hello, I have a question: My mouse has special buttons for "go back" and "go forward". Is there a way in Compose to intercept them and add behaviour for them?
    b
    i
    • 3
    • 2
  • s

    spierce7

    08/31/2021, 9:41 PM
    Do we have a compose 1.5.30 stable build yet?
    k
    j
    • 3
    • 4
  • c

    Cicero

    09/01/2021, 8:02 AM
    Hello, what are you guys using for string localization?
    r
    x
    d
    • 4
    • 7
  • f

    Frank

    09/01/2021, 9:42 AM
    Correction: I’m using the following plugins:
    plugins {
        val kotlinVersion = "1.5.21"
        kotlin("jvm") version kotlinVersion
        kotlin("kapt") version kotlinVersion
        id("org.jetbrains.compose") version "0.5.0-build262"
    }
    But the @Preview - Annotation is not found anymore. How can I solve this?
    r
    x
    • 3
    • 8
  • f

    Frank

    09/01/2021, 10:08 AM
    I’ve updated to :
    id("org.jetbrains.compose") version "1.0.0-alpha3"
    but the problem persists.
    :thread-please: 5
    s
    • 2
    • 1
  • r

    rnett

    09/02/2021, 5:13 AM
    I'm trying to use
    HorizontalSplitPane
    , but getting
    Cannot coerce value to an empty range: maximum 784.0 is less than minimum 794.0.
    exceptions if I set an minimum size for both
    first
    and
    second
    .
    • 1
    • 2
  • d

    darkmoon_uk

    09/02/2021, 6:49 AM
    Must confess I was unaware of this
    4.x.0
    AGP version - is that what we're 'supposed' to be using for CfD!? Maybe that's partly where I've been going wrong.
    j
    i
    • 3
    • 3
  • d

    darkmoon_uk

    09/02/2021, 6:53 AM
    Huh, that doesn't even look special, just a straight-up ancient version of AGP. I feel like I'm missing something.
    o
    • 2
    • 1
  • a

    Ayfri

    09/02/2021, 11:55 AM
    why do I have this in latest build ? how do I fix it ? I tried to reload gradle, restart IJ with restarting indexes, remove .idea & .gradle but I still ahve this
    h
    a
    +2
    • 5
    • 11
  • j

    Javier

    09/02/2021, 12:44 PM
    I am facing this issue:
    Cannot find libskiko-macos-x64.dylib.sha256
    Anyone is getting it too? with alpha4 from 310 to 331
    o
    • 2
    • 6
  • a

    Ayfri

    09/02/2021, 5:11 PM
    Hi, I'm trying to use LazyColumn but I have a weird problem, I have a @Composable function that takes a
    channel
    class which has a
    message
    property which is a
    MutableMap<Long, Message>
    then I show the list of the messages using the LazyColumn, for that I have no problem. But when I create my
    channel
    , I add to it 20 messages by doing this
    for (i in 0..20) {
        channel.messages.put(i, Message("test $i"))
    }
    But in result I get 2-3 messages only, and the numbers are random, sometimes it's 0, 5 and 14, sometimes 5 and 20, and it's very weird and I can't find a way to make it working, what am I doing wrong ? I'm using the 1.0.0-alpha4-build331 version.
    h
    z
    • 3
    • 36
  • k

    Kirill Grouchnikov

    09/02/2021, 6:28 PM
    In the context of https://github.com/JetBrains/skiko/pull/150 which is titled "Remove Skija, prepare for truly MPP Skiko", can the "Remove Skija" part be clarified a bit? Right now I've started to lean more on Skia (through Skija), primarily in the area of dynamic filtering and texture generation. Is that dependency eventually planned to go away in Compose Desktop?
    o
    s
    +2
    • 5
    • 16
  • s

    Siva Nimmala

    09/03/2021, 7:28 AM
    Hi everyone, I have generated native exe using Jetpack Compose and tried to run on another laptop but it's not executing without Java. How to generate native build including JVM binaries? Please help.
    o
    b
    l
    • 4
    • 16
  • a

    Ayfri

    09/05/2021, 11:40 AM
    Hi, in a
    Row
    I have two boxes, is there a way to set the second box to the right side of the screen while keeping the first in the left side ?
    a
    f
    • 3
    • 3
  • a

    Ayfri

    09/05/2021, 4:04 PM
    Hi again, still in a
    Row
    , how can I set a required width for the second element, but have the first element just have a minimum size but take the maximum size available without overlapping the second element ?
    j
    f
    t
    • 4
    • 10
  • j

    Javier

    09/06/2021, 11:01 AM
    Compose desktop preview window supports scrolling? I have a large composable and it get cut at the bottom.
    o
    • 2
    • 1
  • t

    theapache64

    09/06/2021, 7:07 PM
    For some reason my compose desktop app crashes in macOS. The weird part is, it only crashes when I run the exported app/dmg. Not even in the
    runDistributable
    . How do I get the crashlog in this case?
    s
    l
    • 3
    • 52
  • a

    Ayfri

    09/06/2021, 7:28 PM
    Hi, in my
    resources
    folder I have a folder named
    languages
    with inside a
    kotlin.json
    file, but when I do
    ""::class.java.getResource("languages/kotlin.json")
    I get
    null
    , why does it occurs ?
    ✅ 1
    t
    e
    • 3
    • 4
Powered by Linen
Title
a

Ayfri

09/06/2021, 7:28 PM
Hi, in my
resources
folder I have a folder named
languages
with inside a
kotlin.json
file, but when I do
""::class.java.getResource("languages/kotlin.json")
I get
null
, why does it occurs ?
✅ 1
t

theapache64

09/06/2021, 7:31 PM
Can you try with
.java.*classLoader*.getResource
?
a

Ayfri

09/06/2021, 7:34 PM
I get
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "java.lang.ClassLoader.getResource(String)" because the return value of "java.lang.Class.getClassLoader()" is null
	at MainKt$App$1.invoke(Main.kt:22)
e

ephemient

09/06/2021, 8:00 PM
instead of
""
try one of your own classes.
String
is from the bootstrap classloader
a

Ayfri

09/06/2021, 8:02 PM
oh it works, nice, thank you a lot !
View count: 30