codelab-kotlin-coroutines icon indicating copy to clipboard operation
codelab-kotlin-coroutines copied to clipboard

"Type inference failed" error in "6. Building logic with LiveData"

Open naco-siren opened this issue 5 years ago • 0 comments
trafficstars

image

Need to explicitly specify the return type for getPlantsWithGrowZone From:

fun getPlantsWithGrowZone(growZone: GrowZone) = liveData {

To:

fun getPlantsWithGrowZone(growZone: GrowZone) : LiveData<List<Plant>> = liveData {

naco-siren avatar Nov 23 '20 08:11 naco-siren