https://kotlinlang.org logo
Docs
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
  • k

    Kaushalya Pradeep

    01/29/2020, 2:56 PM
    @romainguy Do you guys have any release plan / ETA for Jetpack Compose? or going with the natural flow?
    b
    s
    +4
    • 7
    • 15
  • s

    Subhash

    01/29/2020, 4:27 PM
    Minor help request: I am not being able to scroll the contents. Am I doing something wrong here?@Composable
    fun ArtistsList(artistsLiveData: LiveData<List<Artist>>) {
        val artists = +state { artistsLiveData.value }
        val artistObserver = Observer<List<Artist>> {
            artists.value = it
        }
        +onActive {
            artistsLiveData.observeForever(artistObserver)
        }
        +onDispose {
            artistsLiveData.removeObserver(artistObserver)
        }
        VerticalScroller {
            Column(modifier = Expanded) {
                artists.value?.forEach {
                    Row(modifier = ExpandedWidth wraps Spacing(all = 8.dp)) {
                        Container(Spacing(4.dp), width = 40.dp, height = 40.dp) {
                            val image = +state<Image?> { null }
                            prepareImage(url = it.picture_small, state = image)
                            image.value?.let {
                                DrawImage(image = it)
                            }
                        }
                        Text(
                            text = it.name,
                            modifier = ExpandedWidth,
                            style = (+ambient(Typography)).body1
                        )
                    }
                }
            }
        }
    }
    z
    • 2
    • 3
  • i

    Ian Warwick

    01/29/2020, 7:33 PM
    did we just get a new release? 😄 🎆
    👀 4
    c
    • 2
    • 10
  • i

    Ian Warwick

    01/29/2020, 7:33 PM
    e: /Users/ian.warwick/Documents/sdev/memset/router/src/main/java/com/citizenwarwick/memset/router/Router.kt: (94, 32): Using 'unaryPlus(): T' is an error. The unary plus for effects is no longer needed. Remove it.
    b
    a
    r
    • 4
    • 19
  • t

    tcracknell

    01/29/2020, 8:23 PM
    Hello! I'm happy to announce that the Jetpack Compose dev04 drop has just been released! You can get it on Google’s Maven Repository or by upgrading your version in the latest Android Studio canary. Compose is developed in the open, so the latest changes were always available, but we are moving to a continuous release model for binaries to make it easier to dogfood the latest API changes. Release notes are linked at https://developer.android.com/jetpack/compose. Thank you for your continued feedback, and please continue logging issues at https://issuetracker.google.com/issues/new?component=612128!
    🎉 10
    🚀 21
    z
    s
    +2
    • 5
    • 5
  • e

    Egor Trutenko

    01/29/2020, 9:20 PM
    Hi! Probably was already asked, but I'll try and duplicate: why do we need constraint layout in Compose? Isn't Compose layout system able to flatten complex nested hierarchies?
    z
    m
    +3
    • 6
    • 10
  • z

    Zach Klippenstein (he/him) [MOD]

    01/29/2020, 9:29 PM
    As of dev04, I’m getting a compilation error any time any of my composables tries accessing an ambient. Is there any new gradle/compiler configuration we need? Error + stacktrace in thread.
    t
    • 2
    • 6
  • z

    Zach Klippenstein (he/him) [MOD]

    01/29/2020, 10:38 PM
    It looks like it’s still not possible to host an Android
    View
    nested inside a compose container, is that true?
    m
    l
    • 3
    • 5
  • d

    dimsuz

    01/29/2020, 11:09 PM
    From changelog:
    Added DrawModifier, a modifier type that is allowed to draw on the surface of the modified layout.
    I have a fear that this modifier-stuff has a potential to make API quite messy where you can do everything in modifier and they'll be misused. Like some widget will decide that it wants to draw its content with DrawModifier and I can't theme it. Or it will decide to size itself through modifier constraints in some clever way and won't let me size it in the usual way. etc etc Tell me I'm wrong! :)
    ➕ 2
    r
    m
    • 3
    • 5
  • c

    codeslubber

    01/30/2020, 12:05 AM
    Looks like
    HeightSpacer
    and
    WidthSpacer
    are gone in 04? cannot find info on their replacements..
    m
    • 2
    • 3
  • c

    codeslubber

    01/30/2020, 3:04 AM
    We have to put
    @Composable
    on onClick lambdas now?? ugh…
    r
    • 2
    • 27
  • c

    codeslubber

    01/30/2020, 3:59 AM
    So I did a stepper in Compose and followed an example where I had the state in the Composable method, then called a stepper function and passed it the state. Worked in 03, does not compile in 04, tells me I cannot mutate a val.
    @Composable
    fun MeasureQuestionView() {
        val typography = (MaterialTheme.typography())
    
        val rangeOfValues = 115..125
        val currentValue = state {rangeOfValues.first}
    
        Card(shape = RoundedCornerShape(8.dp)) {
            Column(modifier = Spacing(16.dp)) {
                Text("What was your blood sugar reading?", style = typography.h6)
                numberStepper(currentValue, rangeOfValues, "mg/dL")
            }
        }
    
    }
    
    @Composable
    fun numberStepper(currentValue: State<Int>, range: IntRange, units: String) {
        val typography = (MaterialTheme.typography())
    
        Container(height = 75.dp) {
            Row(Spacing(20.dp)) {
                Button(text = "-", onClick = {
                    if (currentValue.value > range.first) {
                        currentValue.value -= 1
                    }
                })
                Spacer(LayoutWidth(10.dp))
                Text(currentValue.value.toString(), style = typography.h5)
                Spacer(LayoutWidth(10.dp))
                Button(text = "+", onClick = {
                    if (currentValue.value < range.last) currentValue.value += 1
                })
                Spacer(LayoutWidth(10.dp))
                Align(Alignment.CenterLeft){
                    Text(units)
                }
            }
        }
    
    }
    a
    • 2
    • 6
  • z

    zhuinden

    01/30/2020, 4:27 AM
    e: java.lang.IllegalStateException: Backend Internal error: Exception during code generation
    Element is unknownThe root cause java.util.NoSuchElementException was thrown at: androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.irComposableExpr(ComposableCallTransformer.kt:1362)
    	at org.jetbrains.kotlin.codegen.CompilationErrorHandler.lambda$static$0(CompilationErrorHandler.java:35)
    	at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:93)
    	at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm$default(JvmBackendFacade.kt:64)
    	at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:52)
    	at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.generateModule(JvmIrCodegenFactory.kt:36)
    	at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.doGenerateFiles(KotlinCodegenFacade.java:47)
    	at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:39)
    	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:638)
    	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:198)
    	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:172)
    	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:56)
    	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:85)
    	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:43)
    	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:104)
    Caused by: java.util.NoSuchElementException: Collection contains no element matching the predicate.
    	at androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.irComposableExpr(ComposableCallTransformer.kt:1362)
    	at androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.visitBlock(ComposableCallTransformer.kt:252)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlock(IrElementTransformerVoid.kt:128)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlock(IrElementTransformerVoid.kt:24)
    	at org.jetbrains.kotlin.ir.expressions.impl.IrBlockImpl.accept(IrBlockImpl.kt:52)
    	at org.jetbrains.kotlin.ir.expressions.IrExpression$DefaultImpls.transform(IrExpression.kt:28)
    	at org.jetbrains.kotlin.ir.expressions.impl.IrExpressionBase.transform(IrExpressionBase.kt:24)
    	at org.jetbrains.kotlin.ir.expressions.impl.IrTypeOperatorCallImpl.transformChildren(IrTypeOperatorCallImpl.kt:75)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:288)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildrenVoid(IrElementTransformerVoid.kt:283)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildren(IrElementTransformerVoid.kt:25)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitExpression(IrElementTransformerVoid.kt:112)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitTypeOperator(IrElementTransformerVoid.kt:214)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitTypeOperator(IrElementTransformerVoid.kt:215)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitTypeOperator(IrElementTransformerVoid.kt:24)
    	at org.jetbrains.kotlin.ir.expressions.impl.IrTypeOperatorCallImpl.accept(IrTypeOperatorCallImpl.kt:68)
    	at org.jetbrains.kotlin.ir.expressions.IrExpression$DefaultImpls.transform(IrExpression.kt:28)
    	at org.jetbrains.kotlin.ir.expressions.impl.IrExpressionBase.transform(IrExpressionBase.kt:24)
    	at org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl.transformChildren(IrVariableImpl.kt:93)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:288)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildrenVoid(IrElementTransformerVoid.kt:283)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildren(IrElementTransformerVoid.kt:25)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:46)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:87)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:88)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:24)
    	at org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl.accept(IrVariableImpl.kt:86)
    	at org.jetbrains.kotlin.ir.declarations.IrDeclaration$DefaultImpls.transform(IrDeclaration.kt:42)
    	at org.jetbrains.kotlin.ir.declarations.impl.IrDeclarationBase.transform(IrDeclarationBase.kt:27)
    	at org.jetbrains.kotlin.ir.expressions.impl.IrBlockBodyImpl.transformChildren(IrBlockBodyImpl.kt:49)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:288)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildrenVoid(IrElementTransformerVoid.kt:283)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildren(IrElementTransformerVoid.kt:25)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBody(IrElementTransformerVoid.kt:93)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:99)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:100)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:24)
    	at org.jetbrains.kotlin.ir.expressions.impl.IrBlockBodyImpl.accept(IrBlockBodyImpl.kt:40)
    	at org.jetbrains.kotlin.ir.expressions.IrBody$DefaultImpls.transform(IrBody.kt:24)
    	at org.jetbrains.kotlin.ir.expressions.IrBlockBody$DefaultImpls.transform(IrBody.kt)
    	at org.jetbrains.kotlin.ir.expressions.impl.IrBlockBodyImpl.transform(IrBlockBodyImpl.kt:26)
    	at org.jetbrains.kotlin.ir.declarations.impl.IrFunctionBase.transformChildren(IrFunctionBase.kt:77)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:288)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildrenVoid(IrElementTransformerVoid.kt:283)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildren(IrElementTransformerVoid.kt:25)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:46)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFunction(IrElementTransformerVoid.kt:55)
    	at androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.visitFunction(ComposableCallTransformer.kt:205)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:58)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:59)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:24)
    	at org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl.accept(IrFunctionImpl.kt:89)
    	at org.jetbrains.kotlin.ir.declarations.IrDeclaration$DefaultImpls.transform(IrDeclaration.kt:42)
    	at org.jetbrains.kotlin.ir.declarations.impl.IrDeclarationBase.transform(IrDeclarationBase.kt:27)
    	at org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl.transformChildren(IrFileImpl.kt:71)
    	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:288)
    	at androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.lower(ComposableCallTransformer.kt:197)
    	at org.jetbrains.kotlin.backend.common.LowerKt.lower(Lower.kt:66)
    	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$makeIrModulePhase$1.invoke(PhaseBuilders.kt:235)
    	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$makeIrModulePhase$1.invoke(PhaseBuilders.kt:228)
    	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper$runBody$1.invoke(CompilerPhase.kt:128)
    	at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.downlevel(CompilerPhase.kt:24)
    	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.runBody(CompilerPhase.kt:127)
    	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.invoke(CompilerPhase.kt:105)
    	at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:29)
    	at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:42)
    	at org.jetbrains.kotlin.backend.jvm.JvmLower.lower(JvmLower.kt:288)
    	at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:91)
    	... 37 more
    
    
    e: java.lang.IllegalStateException: Backend Internal error: Exception during code generation
    All I did was update this repo: https://github.com/Zhuinden/compose-simple-stack-experiment to dev04 and then remove
    unaryPlus
    from before where it was still there, and boom compilation exception in compiler 🤔
    • 1
    • 2
  • c

    codeslubber

    01/30/2020, 4:32 AM
    Finally got my project to compile!! now a nutty thing is happening with my stepper. On first render things look fine: but then when I click + I get this:
    z
    r
    • 3
    • 10
  • i

    Ian Warwick

    01/30/2020, 9:24 AM
    I managed to get my playground app working but hitting this now
    e: org.jetbrains.kotlin.util.KotlinFrontEndException: Front-end Internal error: Failed to analyze declaration Mapper
    File being compiled at position: (21,1) in /Users/ian.warwick/Documents/sdev/memset/router/src/main/java/com/citizenwarwick/memset/router/Mapper.kt
    The root cause java.lang.OutOfMemoryError was thrown at: unknown
    	at org.jetbrains.kotlin.resolve
    Wondering if its because I am offline, will try restart maybe some java process holding to much mem?
    c
    • 2
    • 3
  • c

    camkadev

    01/30/2020, 10:19 AM
    Functions which invoke @Composable functions must be marked with the @Composable annotation
    any workaround to change data (outside Composable) placed inside state?
    i
    z
    • 3
    • 11
  • i

    Ian Warwick

    01/30/2020, 11:19 AM
    Not sure what the purpose of
    key
    is?
    for (user in users) {
        key(user.id) { UserPreview(user = user) }
    }
    The docs don't really explain why you would use it 🤔 or I am not reading them properly
    k
    • 2
    • 2
  • i

    Ian Warwick

    01/30/2020, 2:04 PM
    Should we be using
    ModelList
    in our models? I found it was the only way to detect changes in a list but not sure if its for use in
    @Model
    annotated classes 🤔
    a
    • 2
    • 10
  • a

    amar_1995

    01/30/2020, 3:09 PM
    I am calling suspend function to retive data from server and then insert that data inside room db. But I am getting this wierd error
    2020-01-30 20:25:18.750 21058-21058/com.amar.modularnewsapp E/AndroidRuntime: FATAL EXCEPTION: main
        Process: com.amar.modularnewsapp, PID: 21058
        java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Number.intValue()' on a null object reference
            at com.amar.modularnewsapp.repository.ArticleRepo$$loadMoreData$Continuation.invokeSuspend(Unknown Source:14)
            at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
            at kotlinx.coroutines.ResumeModeKt.resumeUninterceptedMode(ResumeMode.kt:46)
            at kotlinx.coroutines.internal.ScopeCoroutine.afterCompletionInternal(Scopes.kt:32)
            at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:310)
            at kotlinx.coroutines.JobSupport.tryFinalizeSimpleState(JobSupport.kt:276)
            at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:807)
            at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:787)
            at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:111)
            at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
            at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:241)
            at android.os.Handler.handleCallback(Handler.java:883)
            at android.os.Handler.dispatchMessage(Handler.java:100)
            at android.os.Looper.loop(Looper.java:214)
            at android.app.ActivityThread.main(ActivityThread.java:7356)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
    y
    • 2
    • 6
  • m

    Mate

    01/30/2020, 8:43 PM
    kapt still can't be used together with compose? I tried 0.1.0-dev04 still gets
    e: java.lang.NoSuchMethodError: org.jetbrains.kotlin.codegen.state.GenerationState$Builder.isIrBackend(Z)Lorg/jetbrains/kotlin/codegen/state/GenerationState$Builder;
    https://issuetracker.google.com/u/1/issues/143232368 https://youtrack.jetbrains.com/issue/KT-34583
    j
    • 2
    • 15
  • c

    codeslubber

    01/31/2020, 1:19 AM
    Why do the release notes tell you
    wraps
    is deprecated for combining `Modifier`s but then the docs say unary is temporary?
    j
    • 2
    • 2
  • k

    Klaas Kabini

    01/31/2020, 4:00 AM
    I have updated my project from 0.1.0-dev03 to 0.1.0-dev04 including updating to new API changes that comes with 0.1.0-dev04 and now I am getting the following error. It was working fine on 0.1.0-dev03 prior to this update. Does anyone has an idea of what might be thee root cause of this error?
    java.lang.IllegalStateException: Backend Internal error: Exception during code generation
    Element is unknownThe root cause java.util.NoSuchElementException was thrown at: androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.irComposableExpr(ComposableCallTransformer.kt:1362)
    	at org.jetbrains.kotlin.codegen.CompilationErrorHandler.lambda$static$0(CompilationErrorHandler.java:35)
    	at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:93)
    .............
    Caused by: java.util.NoSuchElementException: Collection contains no element matching the predicate.
    	at androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.irComposableExpr(ComposableCallTransformer.kt:1362)
    	at androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.visitBlock(ComposableCallTransformer.kt:252)
    ...................
    j
    • 2
    • 3
  • j

    Joseph Cheng

    01/31/2020, 4:59 AM
    Hi, I try to implement color selector on the button background. Any API I can use so far? The first thought I can use is
    PressIndicatorGestureDetector
    , like
    Ripple
    to customize one.
    <?xml version="1.0" encoding="utf-8"?>
    <selector xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:state_pressed="true"
              android:color="#ffff0000"/> <!-- pressed -->
        <item android:state_focused="true"
              android:color="#ff0000ff"/> <!-- focused -->
        <item android:color="#ff000000"/> <!-- default -->
    </selector>
    i
    • 2
    • 3
  • m

    molikto

    01/31/2020, 5:10 AM
    Hello, I am reading the source code of compose, can I ask a question, what's the purpose of "androidx.compose.frames.Frame"?
    c
    m
    • 3
    • 7
  • c

    camkadev

    01/31/2020, 9:48 AM
    i try to run sample with Constraints but without luck because Tag modifier hidden somewhere, can't import them, any idea?
    m
    c
    +2
    • 5
    • 7
  • a

    amar_1995

    01/31/2020, 10:22 AM
    Purpose and difference of Key and Pivotal ?
    m
    • 2
    • 12
  • i

    Ian Warwick

    01/31/2020, 11:10 AM
    Hey composers, wrote about my experience so far https://medium.com/@fluxtah/jetpack-compose-is-getting-great-fast-735d97b88e98?source=friends_link&amp;sk=90b2c13eaa496e818533fd491ec4884d
    ❤️ 2
    ☝️🏻 1
    k
    a
    • 3
    • 6
  • h

    Hackdiod

    01/31/2020, 11:38 AM
    Hello! Do you now, how use Center item for few elements. I have Row>Column*2>Text*4, but Row>Column*2>Center>Column>Text*4 it works incorrectly. I think use Center to each text is the wrong approach.
    m
    • 2
    • 3
  • a

    amar_1995

    01/31/2020, 12:56 PM
    I updated my project from dev03 to dev04 and get this error.
    java.lang.ClassCastException: androidx.compose.GroupStart cannot be cast to androidx.ui.foundation.ScrollerPosition
    It was working fine in dev03. Can anyone help me to resolve this error and why this is occuring ??
    i
    m
    a
    • 4
    • 24
  • c

    carbaj0

    01/31/2020, 3:56 PM
    is there any plan for this component? https://material.io/components/bottom-navigation/
    l
    • 2
    • 2
Powered by Linen
Title
c

carbaj0

01/31/2020, 3:56 PM
is there any plan for this component? https://material.io/components/bottom-navigation/
l

Louis Pullen-Freilich [G]

01/31/2020, 3:57 PM
Yup, this will be added in the future.
c

carbaj0

01/31/2020, 3:58 PM
👌
View count: 2