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
android
  • m

    marstran

    11/16/2017, 11:47 AM
    @spirosoik That question was asked at #codingconventions a couple of days ago. They agreed upon having it as a
    private const val
    at file level (outside the class).
    💯 1
    s
    l
    • 3
    • 3
  • m

    matej

    11/16/2017, 12:54 PM
    but having a notificationManager extension property on a Context object, which under the hood does the getSystemService song and dance, wouldn't be so bad I suppose
    l
    i
    • 3
    • 4
  • d

    david.bilik

    11/16/2017, 1:07 PM
    Anko has this extensions
    i
    • 2
    • 1
  • j

    jackmiras

    11/16/2017, 5:14 PM
    Hi guys, silly question... If I'm using
    something?.let{}
    there is a fallback delegate for the case of the item be null? Or in this case I should write a null check?
    l
    • 2
    • 1
  • s

    skennedy

    11/17/2017, 2:04 AM
    when i try to run an instrumentation test on api 19, i get
    java.lang.NoClassDefFoundError: kotlin.jvm.internal.Intrinsics
    . it works fine on 22
    y
    • 2
    • 2
  • u

    540grunkspin

    11/17/2017, 9:28 AM
    Is sharing libraries you made frowned upon here. Would love some feedback!
    y
    • 2
    • 1
  • j

    James Coggan

    11/17/2017, 9:53 PM
    @spirosoik worked fine on our system, we also implemented Deteck for Kotlin static analysis
    s
    • 2
    • 9
  • s

    Scott

    11/18/2017, 3:58 PM
    But if I see one more "advanced mastery" course that only goes up to lambdas and higher order functions I think I'm going to scream
    😂 1
    r
    • 2
    • 3
  • m

    murt

    11/19/2017, 11:04 AM
    hey guys what kotlin DI librarty would you recommend: Koin wither Kodein ?
    b
    r
    +3
    • 6
    • 47
  • p

    pappu

    11/20/2017, 4:02 AM
    I dont know java but trying to make a simple app using kotlin....😁 please experienced people ........ How to display a local HTML file in webview with kotlin ........ Thank u
    g
    • 2
    • 1
  • e

    edwardwongtl

    11/21/2017, 10:11 AM
    If you can get the job done using Java, there is really no reason to force a switch. We switched because the features really helps us as a developer to save time and effort
    n
    • 2
    • 10
  • l

    leosan

    11/21/2017, 10:12 AM
    Sure I had the same doubts initially, but I confess I switched most because of hype and because I found very pleasant to writing Kotlin code 🙈
    n
    • 2
    • 19
  • s

    Scott

    11/21/2017, 12:25 PM
    Do people typically share their Live Templates? I've been looking around and haven't found any for download and it seems like it would be one of the best things to share for people at all levels.
    f
    • 2
    • 1
  • k

    krokyze

    11/22/2017, 1:58 PM
    Would it be ok to register greenrobot EventBus in android architecture ViewModel and unregister it in onCleared()?
    d
    • 2
    • 1
  • s

    shebsa

    11/22/2017, 2:42 PM
    Speaking of json serialization, which one would you recommend for kotlin? Moshi, Jackson, Gson or something else?
    s
    b
    k
    • 4
    • 5
  • c

    cypher121

    11/23/2017, 3:03 AM
    I was wondering, how much do you guys use XML in code? I'm still learning, so I'm not sure if it's better kept to a minimum with help of libraries like anko
    g
    j
    +2
    • 5
    • 12
  • d

    dmytro

    11/23/2017, 1:15 PM
    2k methods is very big number?
    n
    • 2
    • 4
  • d

    dave08

    11/23/2017, 5:12 PM
    Not sure if this is the right place to ask but what is this error?
    Error:Execution failed for task ':app:javaPreCompileDebug'.
    > Annotation processors must be explicitly declared now.  The following dependencies on the compile classpath are found to contain annotation processor.  Please add them to the annotationProcessor configuration.
        - butterknife-7.0.1.jar (com.jakewharton:butterknife:7.0.1)
      Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior.  Note that this option is deprecated and will be removed in the future.
      See <https://developer.android.com/r/tools/annotation-processor-error-message.html> for more details.
    • 1
    • 1
  • j

    juliocbcotta

    11/23/2017, 6:45 PM
    Hi, is there any known bug that calling kotlinMap.forEach causes proguard to create a warning like
    MyClass$myMethod$1$1$1: can't find referenced class MyClass$myMethod$1$1
    ?
    d
    • 2
    • 2
  • s

    smilecs

    11/24/2017, 11:42 AM
    what’s the suggested test framework to use for kotlin based android app
    g
    r
    r
    • 4
    • 41
  • r

    rkeazor

    11/25/2017, 2:48 PM
    wonder how well does it scale when mocking final classes in a big test suite ?
    u
    • 2
    • 4
  • k

    koufa

    11/26/2017, 9:42 AM
    Or how to you handle the
    lifecycle
    with
    coroutines
    ? How do you avoid leaking an
    activity
    ? Is
    job.cancel()
    on
    onDestroy
    enough to avoid memory leaks?
    l
    • 2
    • 1
  • a

    alex.tavella

    11/26/2017, 7:40 PM
    imo, stop using butterknife. Use lazy properties instead.
    a
    • 2
    • 1
  • k

    krenvpravo

    11/26/2017, 10:28 PM
    Android extentions useful only if you have short, while still unique ids. It is not the case for big apps with many complex UI elements.
    r
    p
    • 3
    • 9
  • a

    alex.tavella

    11/26/2017, 11:09 PM
    The problem I see with lateinit is that your property is not immutable, I still prefer to use lazy delegate with no thread safety argument
    r
    a
    • 3
    • 3
  • d

    dekans

    11/27/2017, 9:08 AM
    @alex.tavella I doesn't work in fragments. Views are destroyed and re-inflated on rotation, but fragment (and its references) persists, so you leak old views refs and can't update the new ones
    a
    • 2
    • 1
  • a

    Anil Sisodiya

    11/27/2017, 12:59 PM
    @adam-mcneilly I think you should use these extension once view created in fragement
    a
    • 2
    • 1
  • s

    simon.vergauwen

    11/27/2017, 1:12 PM
    Any1 successfully using
    Parcelize
    with proguard?
    o
    y
    • 3
    • 3
  • d

    david.bilik

    11/27/2017, 1:20 PM
    @simon.vergauwen Nope, I must`ve added this to proguard rules
    # Parcelize shit
    # workaround for jenkins to build app, for unknown reason, Parcelize is not working
    -dontwarn **kotlin.internal.annotations.AvoidUninitializedObjectCopyingCheck**
    j
    • 2
    • 2
  • c

    codeslubber

    11/27/2017, 6:44 PM
    this is not really Kotlin-specific but did anyone manage to get the new Pixel2 images into AS3? supposedly they were in 26.0.2 but I am not seeing them...
    t
    • 2
    • 4
Powered by Linen
Title
c

codeslubber

11/27/2017, 6:44 PM
this is not really Kotlin-specific but did anyone manage to get the new Pixel2 images into AS3? supposedly they were in 26.0.2 but I am not seeing them...
t

trevjones

11/27/2017, 6:57 PM
if you dig into the pure cli tools you will find that they don't actually install any skins. AS does something odd to facilitate all the pretty options. also if you create an AVD from the CLI it is unusable without modifying the resulting ini config
c

codeslubber

11/27/2017, 7:08 PM
weird
but the other dev on the team has it!
she sent me a screenshot and there are the 2 Pixel2 devices in the AVD manager..
View count: 4