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

    dragas

    01/25/2017, 8:44 AM
    Should snackbars just appear or slide in like they usually do when they're created in
    onActivityResult
    ?
    r
    • 2
    • 3
  • m

    miha-x64

    01/28/2017, 8:49 PM
    Class not found: com.package.Class. Empty test suite.
    Android Studio, why? Some of details. Trying to test Java Library module in AS which depends ob another Java Library and another library's test-scope classes. Java tests work. Why?
    z
    t
    • 3
    • 18
  • e

    enighma

    02/01/2017, 8:35 PM
    It depends on what you wanna test. My approach means you just need to add to run the existing uninstall gradle task in the
    Before launch
    for your run config.
    👍 1
    d
    • 2
    • 1
  • e

    elect

    02/02/2017, 7:55 PM
    Sorry, but I disagree, kotlin fit perfectly GL dev Oh, and btw, I am writing a glm kotlin.. would that be interesting for you? https://github.com/elect86/glm
    s
    r
    • 3
    • 11
  • m

    mg6maciej

    02/03/2017, 9:42 PM
    Well known facts: - Vladimirs are from Russia - Russians are good developers - Good developers use good languages - Kotlin is a good language imply a lot of Vladimirs in Kotlin slack!
    👍 4
    👍🏽 4
    k
    • 2
    • 1
  • j

    jan.rabe

    02/10/2017, 9:15 AM
    i prefer just using the https://github.com/johncarl81/parceler lib with data classes
    @Parcel(Parcel.Serialization.BEAN)
    data class MyClass(val value)
    l
    • 2
    • 4
  • k

    kevinmost

    02/13/2017, 10:03 PM
    are there any resources on how the synthetic properties in the Kotlin Android extensions are created? These seem really powerful and it'd be cool to explore more applications of them, but I'm not really sure how they're generated off XML layouts
    v
    • 2
    • 3
  • f

    frank

    02/14/2017, 6:05 PM
    Well, should've seen that coming. How I understood it you'd use tags only with multiple spinners to differentiate them, but guess with just a single one they also work great. Thanks, I'll see how it works out!
    m
    • 2
    • 2
  • n

    nitrog42

    02/15/2017, 3:19 PM
    jodatime or threetenabp
    🅿️ 2
    ➕ 4
    1️⃣ 3
    🌮 1
    0️⃣ 3
    😀 1
    3️⃣ 3
    :trollface: 2
    🆎 2
    k
    m
    • 3
    • 2
  • m

    marcinmoskala

    02/15/2017, 5:40 PM
    https://github.com/MarcinMoskala/KotlinPreferences
    👍 1
    m
    b
    k
    • 4
    • 6
  • r

    robin

    02/16/2017, 1:55 PM
    @miha-x64 Oh I see what you're getting at, if you just want to use the views you can do so without the lazy, yes. But if you add them as properties to your activity, e.g. to rename them to not have snake case in your code, then you have to use lazy, as otherwise kotlinx will try to find the views while onCreate hasn't even run yet.
    m
    k
    • 3
    • 15
  • m

    mingkangpan

    02/17/2017, 12:12 PM
    kotlin 1.1 is in release candodate, but I am afraid we still cant use the features which require java 8 right? since android still doesnt support java 8
    m
    • 2
    • 3
  • b

    bernhard

    02/17/2017, 12:20 PM
    yeah, but java 8 (at least runtime features like stream-api) are only supported on devices with API 23 24 and higher
    m
    • 2
    • 2
  • m

    mingkangpan

    02/17/2017, 12:31 PM
    do I understand it right? kotlin is compiled in byte code it is not dependent on the java features version, so in theory kotlin can implement all java 8 features and we android devs can use them?
    m
    s
    b
    • 4
    • 10
  • o

    orogersilva

    02/17/2017, 12:40 PM
    Hi! I just published this post: https://medium.com/@orogersilva/helping-androiddev-to-mock-tests-in-kotlin-ab3be5204559#.vfyojx4fm
    m
    • 2
    • 11
  • n

    nawar

    02/19/2017, 3:03 PM
    Hi everyone, I’m sure this question has been asked several times in here (for the life of me I couldn’t find it). I’m embarking on a quest to build an Android app for the first time and my Java knowledge is very rusty and rudimentary as over the years I got spoiled with dynamic languages–read Python and PHP–and easy to grasp languages like Swift. Is Kotlin mature enough to use for the development of an entire Android project. If that’s the case, how straight forward it is to integrate other 3rd party Android Java libraries & SDKs into the code mix? It would be great to get some advice on this as it’s a huge time investment and requires a steep learning curve. Thanks a lot.
    👍 1
    b
    • 2
    • 11
  • b

    brianwernick

    02/20/2017, 3:35 PM
    Oh man, It makes me so sad we are stuck with that in AOSP
    m
    r
    • 3
    • 20
  • c

    cedric

    02/20/2017, 4:01 PM
    The Hungarian notation in Android happened because of me. I need to blog about it one to explain how it came about
    🙀 8
    m
    p
    +2
    • 5
    • 5
  • n

    nebojsa.vuksic

    02/21/2017, 10:24 PM
    Hi guys, can somebody tell me how do you unit test extension functions? Do you verify them as standard method calls or as static methods calls?
    m
    j
    • 3
    • 3
  • r

    rwachol

    02/22/2017, 9:21 AM
    @jw @mg6maciej about yesterday’s rx espresso idling. I’ve found this gist: https://gist.github.com/aahlenst/8d3958ceceb971465873e5818ba6fd1f and then simply made
    @BeforeClass
    in test
    @BeforeClass
    public static void setUp() throws Exception {
      RxIdlingResource rxIdlingResource = new RxIdlingResource();
      Espresso.registerIdlingResources(rxIdlingResource);
      RxJavaPlugins.setScheduleHandler(rxIdlingResource);
    }
    m
    • 2
    • 3
  • e

    eatbears

    02/22/2017, 11:48 AM
    So I think I just did a dumb, forgot to enable the location permission in the app settings...
    :trollface: 1
    🙈 1
    m
    • 2
    • 1
  • k

    kirillrakhman

    02/23/2017, 10:40 AM
    is there a known issue for completion being painfully slow on Android Studio 2.3?
    m
    • 2
    • 1
  • r

    rwachol

    02/24/2017, 1:20 PM
    http://tools.android.com/tech-docs/new-build-system/2-5-alpha-gradle-plugin
    c
    k
    g
    • 4
    • 3
  • j

    jw

    02/25/2017, 2:52 AM
    Why use OpenJDK for luni in the platform only to use a known-buggy compiler with it
    c
    • 2
    • 1
  • k

    koufa

    02/26/2017, 5:35 PM
    Does Kotlin work with Android Databinding?
    d
    d
    m
    • 4
    • 3
  • m

    mg6maciej

    02/27/2017, 6:02 PM
    Not really Kotlin related, but how bad is it to make these values public? https://github.com/pan780919/Brokethenews/blob/85c657365445e181595ffab398b3b587ed482848/taiwanpetadoptionApp/build/generated/res/google-services/release/values/values.xml
    d
    r
    • 3
    • 19
  • u

    uhe

    03/01/2017, 4:47 PM
    every code change 😞
    73ms  :app:mergeDevDebugResources
         53ms  :app:processDevDebugManifest
      28678ms  :app:kaptDevDebugKotlin
       1812ms  :app:compileDevDebugKotlin
       7043ms  :app:compileDevDebugJavaWithJavac
       1479ms  :app:copyDevDebugKotlinClasses
       8729ms  :app:transformClassesAndResourcesWithProguardForDevDebug
       4255ms  :app:transformClassesWithDexForDevDebug
       1828ms  :app:packageDevDebug
    while annotation processing is cool in principle the performance hit really hurts 😕
    m
    a
    +4
    • 7
    • 39
  • b

    bryan

    03/02/2017, 6:50 AM
    Does anyone feel like
    1.1
    slower/laggier in AS than
    1.0.6
    ? Or am I just imagining things? Like typing laggy, autocomplete takes forever. If you enter bad syntax the IDE become unresponsive for several seconds.
    s
    s
    k
    • 4
    • 4
  • o

    okaymak

    03/02/2017, 11:38 AM
    No. It will work in next Lint version (in AS 2.4). https://groups.google.com/forum/#!msg/lint-dev/7nLiXa04baM/KaHIpKFoCQAJ
    m
    • 2
    • 1
  • a

    azabost

    03/02/2017, 12:23 PM
    Anyone using Kotlin 1.1 with Android Data Binding?
    d
    l
    +4
    • 7
    • 17
Powered by Linen
Title
a

azabost

03/02/2017, 12:23 PM
Anyone using Kotlin 1.1 with Android Data Binding?
d

deviant

03/02/2017, 12:52 PM
azabost: yep. works flawlessly.
a

azabost

03/02/2017, 12:59 PM
@deviant thanks for the feedback. I started to think I'm the only one and it will crash sooner or later 🙂
l

lovis

03/02/2017, 1:05 PM
works for me too
m

Marc

03/02/2017, 1:17 PM
works but not with AS 2.3 with the new gradle pluguin (for me at least)
a

azabost

03/02/2017, 1:41 PM
@Marc good to know! I have just tested it myself and also having problems with AS 2.3 RC1 and Kotlin 1.1 (kapt exception when generating sources for Data Binding)
l

lovis

03/02/2017, 3:28 PM
to make this work you need to
kapt “com.android.databinding:compiler:2.3.0-rc1"
⬅️ important to use the correct databinding compiler version
❤️ 1
and also, always delete the whole
build
folder when upgrading android studio and or kotlin 😂
m

Marc

03/02/2017, 3:34 PM
dos it worked for you @lovis ?
l

lovis

03/02/2017, 3:35 PM
yes
This works for me: Android Studio
2.3
Kotlin-AS-Plugin:
1.1.0-release-Studio2.3-1
Kotlin
1.1.0
apply plugin: ‘kotlin-kapt’

…

kapt “com.android.databinding:compiler:$plugin_version”
kapt “com.google.dagger:dagger-compiler:$dagger_version”
kapt “com.jakewharton:butterknife:$butterknife_version”
where
plugin_version = "2.3.0"
dagger_version = "2.2"
butterknife_version = "7.0.1"
kotlin_version = "1.1.0"
oh yeah and
task wrapper(type: Wrapper) {
    gradleVersion = '3.3'
}
❤️ 4
b

bryan

03/02/2017, 5:29 PM
Works for me!
a

aoriani

03/02/2017, 6:15 PM
I am still having problems :
Execution failed for task ':app:compileDevDebugAndroidTestJavaWithJavac'.
> java.lang.RuntimeException: Failed to parse data binding compiler options. Params:
  kapt.annotations : /Users/aoriani/Development/myapp/app/build/tmp/kapt/devDebugAndroidTest/wrappers/annotations.devDebugAndroidTest.txt
  kapt.kotlin.generated : /Users/aoriani/Development/myapp/app/build/tmp/kapt/devDebugAndroidTest/kotlinGenerated
l

lovis

03/03/2017, 8:36 AM
@aoriani this was fixed for me after I applied
apply plugin: ‘kotlin-kapt’
a

aoriani

03/03/2017, 9:51 AM
@lovis oh, I didn’t notice the extra plugin. Thank you so much ! 😄
👍 1
m

Marc

03/03/2017, 10:53 AM
@kalpeshp0310 look at taht it may help you
k

kalpeshp0310

03/03/2017, 10:55 AM
@Marc thanks. just saw that.
👍 1
a

azabost

03/03/2017, 12:45 PM
Works for me too 🙂
View count: 2