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

    kagomez

    06/10/2017, 5:20 AM
    hey guys, do you know if working with Databinding and Butterknife could create some conflicts?
    r
    • 2
    • 5
  • e

    ericksli

    06/10/2017, 7:04 AM
    Any suggested ProGuard rules for kotlin-reflect? I got 4 warnings and cannot build my apk
    Warning: kotlin.reflect.jvm.internal.KFunctionImpl$caller$2: can't find referenced class java.lang.reflect.Executable
    Warning: kotlin.reflect.jvm.internal.KFunctionImpl$caller$2: can't find referenced class java.lang.reflect.Executable
    Warning: kotlin.reflect.jvm.internal.KFunctionImpl$defaultCaller$2: can't find referenced class java.lang.reflect.Executable
    Warning: kotlin.reflect.jvm.internal.KFunctionImpl$defaultCaller$2: can't find referenced class java.lang.reflect.Executable
    r
    • 2
    • 3
  • q

    qlitzler

    06/10/2017, 11:30 AM
    Hello, before filing an issue I wanted to know if anyone else is experiencing this. I’m using Android Lifecycle Architecture with kotlin, and every other compilation I get this:
    java.lang.IllegalStateException: Don't know how to compile annotation value Unresolved enum entry: android/arch/lifecycle/Lifecycle$Event.ON_STOP
    	at org.jetbrains.kotlin.codegen.AnnotationCodegen$2.visitUnsupportedValue(AnnotationCodegen.java:421)
    i
    • 2
    • 1
  • m

    marcinmoskala

    06/11/2017, 12:37 PM
    Hey Kotliners, we are writing book about Android Development with Kotlin for Packt, and we've decided that there needs to be app that will show how all introduced Kotlin features can work together. Points are: * It cannot be long, while it needs to described in 20-30 pages chapter. It wasn't planned previously and now we don't want to make this part to long. Also, it should not be complex and it should use only simple and standard dependencies. I decided to include RxJava, but I am using only most basic features, which are easy to explain. * It should show as much Kotlin features as possible. But they need to be used in good way (reasonable). * We want it to look good (visually). * We would like structure to be simple, but also clean, because readers might later use it as reference in their own projects. This is why we've decided to implement it in MVP. We've decided to make Marvel gallery basing on Marvel API, because it have nice pictures and everyone likes superheroes ( at least I do xD ) I placed code proposition here https://github.com/MarcinMoskala/MarvelGallery We need as much feedback as possible. And every opinion is valuable. Packt is a big publisher, and this book will get to lot's of people. For most of them it will be first contact with Kotlin. And your feedback can make it better. But please, write on priv. I don't want to spam this group.
    👍 3
    b
    • 2
    • 4
  • j

    jasonlow

    06/12/2017, 1:21 AM
    Back when I was doing java, I usually would go with something like this:
    class Foo {
         private Foo mShared;
         private Context context;
    
         public Foo sharedInstance(Context context) {
                    if (mShared == null) {
                             mShared == new Foo(context)
                    }
                    return mShared;
         }
    }
    l
    • 2
    • 1
  • c

    cedric

    06/12/2017, 3:09 AM
    @jasonlow Contexts get valid and invalid depending on where in the app you are, storing one in a global singleton will lead to crashes
    l
    • 2
    • 3
  • t

    thatsmoodi

    06/12/2017, 1:01 PM
    Any powerful kotlin json parsing library
    d
    • 2
    • 4
  • o

    oleksandr.samsonov

    06/12/2017, 1:21 PM
    Find new Job 😄
    :kotlin: 21
    👍 7
    t
    p
    +4
    • 7
    • 16
  • n

    nkraft

    06/12/2017, 1:31 PM
    Clearly your CTO wants you to suffer.
    t
    t
    • 3
    • 6
  • o

    oleksandr.samsonov

    06/12/2017, 6:53 PM
    @kokeroulis Not to flood wrote in private
    m
    • 2
    • 3
  • m

    mg6maciej

    06/12/2017, 10:30 PM
    @budioktaviyan try https://github.com/nhaarman/mockito-kotlin
    b
    • 2
    • 1
  • s

    szymen

    06/12/2017, 10:48 PM
    @budioktaviyan you may also use workaround from this post: https://stackoverflow.com/questions/30305217/is-it-possible-to-use-mockito-in-kotlin if you don't want to include library
    b
    • 2
    • 1
  • c

    chris.zou

    06/13/2017, 6:41 AM
    Hi, anyone know what the number after the “sdk” mean?
    f
    • 2
    • 5
  • p

    Paul Woitaschek

    06/13/2017, 8:02 AM
    Has someone used multiple kotlin modules successfully?
    t
    • 2
    • 10
  • q

    qlitzler

    06/13/2017, 9:18 AM
    yes i'm using 1.1.2-5. Had the same issue with 1.1.2-4
    f
    • 2
    • 2
  • o

    oscarg798

    06/13/2017, 4:42 PM
    hi guys one question which version of kotlin is the last one for android studio, this one 1.1.2-5
    b
    • 2
    • 2
  • k

    kingvhit

    06/14/2017, 2:51 AM
    Sorry for my stupid question but does anybody let me know how can import synthetic automatically ? Like :
    import kotlinx.android.synthetic.main.activity_main.*
    Or any shortcut do it by your hand ?
    a
    s
    • 3
    • 3
  • r

    radityagumay

    06/14/2017, 2:56 AM
    Import ...[classname].[layoutname]
    k
    • 2
    • 5
  • a

    anstaendig

    06/14/2017, 8:01 AM
    Anyone having the same problem?
    l
    • 2
    • 3
  • a

    anstaendig

    06/14/2017, 8:12 AM
    Nevermind, I found the issue
    n
    • 2
    • 2
  • p

    perryprog

    06/14/2017, 12:35 PM
    Well, I guess I should also get the beta?
    p
    • 2
    • 3
  • p

    perryprog

    06/14/2017, 5:06 PM
    I’m trying to start a nexus simulator running Android O... I’m getting:
    Emulator: Failed to open vm 2
    
    Emulator: Failed to create HAX VM
    
    Emulator: No accelerator found.
    
    Emulator: failed to initialize HAX: Invalid argument
    d
    • 2
    • 3
  • j

    jw

    06/14/2017, 7:54 PM
    doesn't seem related to kotlin
    p
    • 2
    • 1
  • p

    pratama

    06/16/2017, 9:35 AM
    kotlin ver
    1.1.2-2
    b
    • 2
    • 2
  • b

    borisdamato

    06/16/2017, 11:16 AM
    I have a problem with Android Studio 3.0 C4 and the Kotlin plugin. Even if I update it to 1.1.2-5, after restarting AS, it still says it's using 1.1.2-4
    v
    k
    • 3
    • 2
  • j

    jordan29.04.1197

    06/16/2017, 2:09 PM
    * What went wrong: Execution failed for task ‘:app:transformClassesWithJarMergingFor<FlavorName>Debug’.
    com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/xmlpull/v1/XmlPullParser.class
    HELP
    p
    t
    • 3
    • 6
  • j

    jw

    06/16/2017, 3:33 PM
    What makes you believe it's related to Kotlin?
    j
    • 2
    • 1
  • k

    krtko

    06/16/2017, 7:13 PM
    which really ruins my layouts
    n
    b
    • 3
    • 16
  • l

    leodeleon

    06/17/2017, 12:01 PM
    FATAL EXCEPTION: main
    Process: com.leodeleon.popmovies, PID: 6911
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.v7.widget.RecyclerView$LayoutManager android.support.v7.widget.RecyclerView.getLayoutManager()' on a null object reference
    at com.leodeleon.popmovies.feature.view.MoviesFragment.onCreateView(MoviesFragment.kt:65)
    at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192)
    r
    • 2
    • 6
  • r

    radityagumay

    06/17/2017, 12:03 PM
    So, who has implement couroutine here? Did someone know, how to not leak an activity which has killed? As far I know, once we reference an activity to couroutine it will leak somewhere. Last but not least, I know to solve this. Just using a weak reference. I won't using it. Weak reference is last bullet. Using it isn't a best practice Indeed. Anyone have approach?
    :kotlin: 2
    • 1
    • 1
Powered by Linen
Title
r

radityagumay

06/17/2017, 12:03 PM
So, who has implement couroutine here? Did someone know, how to not leak an activity which has killed? As far I know, once we reference an activity to couroutine it will leak somewhere. Last but not least, I know to solve this. Just using a weak reference. I won't using it. Weak reference is last bullet. Using it isn't a best practice Indeed. Anyone have approach?
:kotlin: 2
@jw which approach best for this? Could you give me some advice? Thanks
View count: 1