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

    katien

    09/11/2017, 5:35 PM
    Hi everyone, I've been given kind of an odd set of requirements for my latest project. I need to have RocketChat's open source app run inside the app that I am building. I am really not sure how I should approach this, but it sounds like actual changes to the rocketchat functionality will be very minimal - potentially just some resource customization. Any suggestions on where I should start?
    g
    • 2
    • 1
  • p

    Paul Woitaschek

    09/11/2017, 6:43 PM
    app: 'androidProcessor' dependencies won't be recognized as kapt annotation processors. Please change the configuration name to 'kapt' for these artifacts: 'com.android.databinding:compiler:3.0.0-beta5'.
    r
    • 2
    • 1
  • k

    Kasper Liholm

    09/12/2017, 8:40 AM
    I’m testing on several devices at the moment, and so far 10'ish devices work fine, but on a Samsung device running 4.1.2, when installing from Android Studio i get a “java.lang.UnsatisfiedLinkError” on app start. It has this line in the stacktrace: ” at com.android.tools.profiler.support.ProfilerService.<clinit>(ProfilerService.java:41)” This made me think AS might be the cause, so i assembled the app from terminal, and installed it manually via ADB, and then it works completely fine. So AS is the cause of this issue. Has anyone encountered this before, and if so, any way to fix it?
    :stackoverflow: 4
    j
    • 2
    • 1
  • m

    mkojadinovic

    09/12/2017, 1:07 PM
    Hi guys, I am trying to use mock-maker-inline to allow mocking of kotlin classes with mockito ( https://github.com/mockito/mockito/wiki/What's-new-in-Mockito-2#mock-the-unmockable-opt-in-mocking-of-final-classesmethods ) But then I am having issues with old tests. So, when I try to do something like
    verify(adapter).notifyItemMoved(0, 0);
    where
    adapter
    is
    RecyclerView.Adapter
    I am getting error this error might show up because you verify either of: final/private/equals()/hashCode() methods. Did anyone had similar issue ?
    👍 1
    a
    g
    • 3
    • 6
  • a

    adams2

    09/12/2017, 5:46 PM
    thoughts on using
    by lazy
    instead of dagger
    • 1
    • 2
  • j

    jw

    09/12/2017, 5:47 PM
    there's no actual dependency injection
    d
    s
    • 3
    • 8
  • s

    sss

    09/12/2017, 8:07 PM
    hey - guys so we are beginning to refactor a LARGE project into kotlin. Wanted to ask general rules of thumb for 3 things : RxJava, Dagger and Architecture Components. Do you guys use them in the Kotlin world, or is there something built-in that's a better/idiomatic alternative ?
    🎖️ 1
    b
    k
    +3
    • 6
    • 15
  • n

    nicktz

    09/12/2017, 11:42 PM
    also whats the general consensus on MVP vs MVVM + data-binding?
    k
    g
    +2
    • 5
    • 23
  • p

    peasee

    09/13/2017, 7:52 AM
    Anyone know if it's possible to have the 'default new activity animation' on a fragment? EDIT: 😒tackoverflow: is extremely unhelpful for this question https://stackoverflow.com/search?q=fragment+slide+up
    :stackoverflow: 2
    g
    • 2
    • 1
  • a

    adeln

    09/13/2017, 9:29 AM
    so Unused Resources check works correctly in Android Studio? that’s great! 2.x or 3.x only?
    g
    • 2
    • 2
  • m

    miha-x64

    09/13/2017, 9:30 AM
    Any way to add a static field to an object expression? Attempting to make an anonymous parcelable...
    n
    • 2
    • 2
  • s

    sqia09

    09/13/2017, 10:31 AM
    Just looking for the shortest way of implementing Parcelable and I found @Parcelize, so I need help in converting my data class into parcelable data classes:
    data class SiteResponse(@SerializedName("result") val result: String,
                            @SerializedName("freason") val freason: String,
                            @SerializedName("site") val siteList: ArrayList<SiteObject>) {
    
        inner class SiteObject(@SerializedName("name") val name: String,
                               @SerializedName("short_name") val shortName: String,
                               @SerializedName("id") val id: Int,
                               @SerializedName("country_id") val countryId: Int,
                               @SerializedName("region_id") val regionId: Int,
                               @SerializedName("province_id") val provinceId: Int,
                               @SerializedName("city_id") val cityId: Int,
                               @SerializedName("latitude") val latitude: String,
                               @SerializedName("longitude") val longitude: String)
    }
    g
    b
    • 3
    • 29
  • s

    stepan.zalis

    09/13/2017, 12:23 PM
    does anybody know how to handle two parametrs in when statements? like when(Object object) { object == “something” && x == 4 … } ?
    m
    • 2
    • 1
  • e

    ericksli

    09/14/2017, 7:45 AM
    But the demo one is Java
    g
    • 2
    • 2
  • g

    gildor

    09/14/2017, 2:05 PM
    sorry, I misread your dependnecies, you still need rxandroid to have an access to AndroidSchedulers
    s
    e
    • 3
    • 11
  • r

    ricojamie

    09/14/2017, 2:47 PM
    Hey all. I'm a intermediate Android developer, a couple of my own small apps. I want to learn Kotlin. Has anyone used the book Android Development with Kotlin? It's fairly new and I'm trying to decide between that and Kotlin in action.
    t
    • 2
    • 1
  • p

    pablisco

    09/14/2017, 3:00 PM
    I wrote this about intents on Android with Kotlin. Feedback welcomed: https://twitter.com/pablisc0/status/908343823687962624
    g
    • 2
    • 2
  • g

    gouravkundu

    09/14/2017, 3:29 PM
    #android any library for implementing JSONAPI standard response with retrofit for kotlin
    n
    c
    g
    • 4
    • 5
  • d

    david.bilik

    09/15/2017, 6:52 AM
    extension property is pretty constraining, because you may want to pass callback, transformations etc. With function, you can make parameters with default values but with property you are done
    👍 1
    p
    • 2
    • 2
  • s

    scdisorder

    09/15/2017, 6:16 PM
    hi guys, is there someone developing apps with Kotlin? can you recommend me something to read to have a good start? 🙂
    t
    e
    • 3
    • 4
  • j

    jw

    09/15/2017, 7:59 PM
    also true of 1.1.3-2 which a little birdy told me is the version you're using
    i
    e
    • 3
    • 11
  • e

    ech0s7r

    09/16/2017, 4:22 PM
    Is it multithreading and concurrency officially supported by Kotlin now ?
    b
    t
    • 3
    • 2
  • r

    ricojamie

    09/16/2017, 10:14 PM
    If I'm making an app that will use a single table database, what's the best way to go about that? Android room? Or something else?
    :stackoverflow: 10
    :kotlin-flag: 1
    d
    • 2
    • 3
  • d

    dawidhyzy

    09/18/2017, 6:33 AM
    This is normal. Same applies to Gson
    i
    k
    • 3
    • 11
  • e

    Eugen Martynov

    09/18/2017, 9:00 AM
    might be critical
    w
    • 2
    • 3
  • m

    myanmarking

    09/18/2017, 10:56 AM
    clearTable
    is
    @Query("Delete * from xxx")
        fun clearTable()
    d
    • 2
    • 2
  • j

    james

    09/19/2017, 10:09 AM
    I'd like to understand why that solves it though - can anyone shed some light there?
    b
    • 2
    • 1
  • m

    menegatti

    09/19/2017, 1:59 PM
    categories.map { ... }.sortedWith(compareBy({ Math.abs(it.amount) }, { //something else }))
    👍 3
    m
    • 2
    • 2
  • a

    adams2

    09/19/2017, 6:46 PM
    So I used Gson and got this -
    java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter $receiver
    r
    g
    • 3
    • 14
  • s

    sqia09

    09/20/2017, 8:51 AM
    whats the recommended way of debugging sqlite db? I'm using anko sqlite...
    :stackoverflow: 3
    g
    a
    • 3
    • 3
Powered by Linen
Title
s

sqia09

09/20/2017, 8:51 AM
whats the recommended way of debugging sqlite db? I'm using anko sqlite...
:stackoverflow: 3
g

gildor

09/20/2017, 8:53 AM
What do you mean “debugging”? If you just want to check database data, you can use for example Stetho - http://facebook.github.io/stetho/
s

sqia09

09/20/2017, 9:59 AM
what do you think about Android Debug Database? https://github.com/amitshekhariitbhu/Android-Debug-Database
😂 1
a

amugika

09/20/2017, 10:00 AM
I use this link (https://github.com/amitshekhariitbhu/Android-Debug-Database ) and I am very happy with it, gives the option to graphically view in a browser, make queries, add content, delete it, make backups, ...and more.
View count: 5