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

    adams2

    12/07/2017, 7:23 PM
    hmm https://github.com/Kotlin/KEEP/blob/master/proposals/android-extensions-entity-caching.md
    • 1
    • 3
  • s

    spragg

    12/08/2017, 3:06 AM
    Android studio generates that signature base on the Java signature. Which is why I think it makes it nullable
    ➕ 1
    g
    • 2
    • 1
  • b

    budioktaviyan

    12/08/2017, 3:09 AM
    --- adb starting (pid 1161) ---
    adb I 12-08 10:04:50  1161  9192 main.cpp:57] Android Debug Bridge version 1.0.39
    adb I 12-08 10:04:50  1161  9192 main.cpp:57] Version 27.0.0-4455170
    adb I 12-08 10:04:50  1161  9192 main.cpp:57] Installed as /Users/mymac/Library/Android/sdk/platform-tools/adb
    adb I 12-08 10:04:50  1161  9192 main.cpp:57]
    adb I 12-08 10:04:50  1161  9192 adb_auth_host.cpp:416] adb_auth_init...
    adb I 12-08 10:04:50  1161  9192 adb_auth_host.cpp:174] read_key_file '/Users/mymac/.android/adbkey'...
    adb F 12-08 10:04:50  1161  9204 transport_usb.cpp:37] Check failed: usb_packet_size < 4096ULL (usb_packet_size=5120, 4096ULL=4096)
    m
    • 2
    • 2
  • j

    Johnny

    12/08/2017, 12:58 PM
    Hello guys, I'm really new to Android Studio and Kotlin. Could anyone help me with some questions. I want to make an application from which you can download another application: An application manager in which I could download a To Do list if I want, or an Weather app. Anyone has any hints for me on how I should be doing this?
    :stackoverflow: 8
    l
    k
    • 3
    • 4
  • r

    r4zzz4k

    12/08/2017, 7:19 PM
    I see that every property of data class annotated with
    @Table
    should have default value, but your
    value2
    field doesn't have one. Maybe this is the issue? Also, https://agrosner.gitbooks.io/dbflow/content/KotlinSupport.html doesn't mention the need of
    no-arg
    or anything, so you should be able to skip that suggestion.
    g
    • 2
    • 1
  • j

    jw

    12/09/2017, 1:45 AM
    It's not at all helpful
  • r

    rkeazor

    12/11/2017, 1:07 AM
    Why would a repo need to know the android context?
    👍 3
    d
    • 2
    • 1
  • s

    Slackbot

    12/11/2017, 11:23 AM
    This message was deleted.
    g
    • 2
    • 11
  • a

    adam-mcneilly

    12/11/2017, 3:24 PM
    Yeah. I know that's off topic, but since we opened the door to this discussion I figured someone involved could point me in a helpful direction.
    d
    • 2
    • 1
  • v

    vitrox1

    12/11/2017, 4:35 PM
    Hello guys, someone of you have an idea when coroutines are going to have stable version? do you consider them as a rx substitution or parallel use?
    g
    c
    k
    • 4
    • 6
  • r

    ramonsgds

    12/12/2017, 2:20 AM
    @gildor, could you help me with RxJava2?
    g
    • 2
    • 3
  • s

    Slackbot

    12/12/2017, 5:55 AM
    This message was deleted.
    👎🏽 1
    g
    • 2
    • 1
  • j

    Jason

    12/12/2017, 8:48 AM
    I've just started playing around with Kotlin.
    l
    • 2
    • 2
  • r

    rajendhiraneasu

    12/12/2017, 2:00 PM
    is it possible to call the firebase cloud functions through android ? like we do for general web api calls via retrofit or volley?
    g
    • 2
    • 12
  • s

    shebsa

    12/12/2017, 2:49 PM
    Hey, after updating to latest kotlin-plugin in android studio my kotlin tests are crashing on nullpointers one line after the total number of lines in the file. For example:
    java.lang.NullPointerException
    	at com.example.testGetAdsSuccessfully(SavedSearchAdListViewModelTest.kt:64)
    g
    • 2
    • 1
  • s

    shebsa

    12/12/2017, 2:50 PM
    This file is 63 lines long
    g
    • 2
    • 8
  • u

    urs-vj

    12/12/2017, 6:21 PM
    ok here is easy way to go 2.3.3
    g
    • 2
    • 1
  • q

    quock

    12/13/2017, 7:05 AM
    https://blog.jetbrains.com/kotlin/2017/08/kotlin-1-1-4-is-out/ Sorry that was typo
    g
    • 2
    • 3
  • s

    Slackbot

    12/13/2017, 1:38 PM
    This message was deleted.
    y
    l
    • 3
    • 2
  • o

    ontherunvaro

    12/14/2017, 12:51 PM
    But I'm still not sure that it doesn't have to do with kotlin as it was already multidexed before (with over 64k methods)
    h
    • 2
    • 5
  • c

    Charles

    12/14/2017, 2:29 PM
    Typically when I see that error, it’s not actually a dex issue. It’s usually something further up the chain with a dependency mismatch.
    o
    • 2
    • 2
  • s

    Sam Woodall

    12/14/2017, 3:31 PM
    Hi, has anyone experienced problems with
    FragmentPagerAdapter
    when overriding
    setPrimaryItem()
    after updating the support library to version 27.0.0. The signature changed from
    setPrimaryItem(container: ViewGroup, position: Int, obj: Any?)
    to
    setPrimaryItem(container: ViewGroup, position: Int, obj: Any)
    . It's causing an illegal argument exception because obj is null.
    l
    p
    • 3
    • 2
  • f

    fejd

    12/14/2017, 3:58 PM
    Does anyone know how to use Kotlin with an Android.mk file?
    👍 1
    l
    • 2
    • 2
  • e

    edwardwongtl

    12/15/2017, 4:21 AM
    list.map { it.id }
    👍 1
    p
    • 2
    • 2
  • n

    nil2l

    12/15/2017, 12:15 PM
    And I couldn’t find any settings about it.
    e
    • 2
    • 2
  • s

    stantronic

    12/16/2017, 9:29 PM
    Try
    Observable.defer { Observable.just(dataManager.saveRecipes(list)) }.subscribeOn(<http://Schedulers.io|Schedulers.io>())
    👏 2
    v
    k
    • 3
    • 2
  • a

    arekolek

    12/16/2017, 11:08 PM
    Is it possible to achieve encapsulation of the concrete type:
    public class DataViewModel {
        private MutableLiveData<String> data = new MutableLiveData<>();
    
        public LiveData<String> getData() {
            return data;
        }
    }
    in Kotlin without resorting to having a backing property?
    class DataViewModel {
        private val _data = MutableLiveData<String>()
    
        val data: LiveData<String> get() = _data
    }
    s
    k
    • 3
    • 7
  • y

    yuriy.stetsyk

    12/17/2017, 12:31 PM
    Hello folks. Have anybody used Room with Kotlin? I have a problem using type converters to parse list of enums. Here are classes that I use: https://gist.github.com/zamahaka/584963739a010842dfee90a545e34d1d This is the build failure: http://joxi.ru/RmzZPQWTWzv6lm Have anybody encounter same problem?
    a
    • 2
    • 3
  • f

    fradiati

    12/18/2017, 11:40 AM
    how can i solve this problem?
    :stackoverflow: 20
    d
    r
    • 3
    • 2
  • c

    carmelo.iriti

    12/18/2017, 2:14 PM
    Hi everyone! anyone knows if it is possible to mock a kotlin function with mockito?
    a
    s
    r
    • 4
    • 6
Powered by Linen
Title
c

carmelo.iriti

12/18/2017, 2:14 PM
Hi everyone! anyone knows if it is possible to mock a kotlin function with mockito?
a

Alexander Khyzhun

12/18/2017, 2:19 PM
why not?
s

sindrenm

12/18/2017, 2:23 PM
Since Kotlin classes and functions are closed by default and Mockito uses inheritance to mock and stub. However, there are ways to make it work. You might want to have a look at mockito-kotlin: https://github.com/nhaarman/mockito-kotlin
c

carmelo.iriti

12/18/2017, 2:48 PM
@sindrenm thank you a lot!! 🤓
Hi @Alexander Khyzhun, I was asking if it is possible
@Alexander Khyzhun, if you have the answer, please could you share it?
r

radityagumay

12/20/2017, 1:46 AM
I am using mockito. And have no problem with it.
View count: 10