https://kotlinlang.org logo
#android
Title
# android
d

Daniele Segato

12/20/2019, 9:47 AM
JakeWarthon stated here https://youtrack.jetbrains.com/issue/KT-20358 that this bug has been solved in Android Gradle 3.3 Alpha 11 plugin but I can reproduce it in Android Gradle 4.0 Alpha 6 plugin.
Copy code
val map = mapOf<String, String>()
map.getOrDefault("foo", "bar")
This gives no warning from either the compiler or lint and crashes at runtime (on Lollipop) with
Fatal Exception: java.lang.NoSuchMethodError
Am I missing something?
m

Mark Murphy

12/20/2019, 12:09 PM
Possibly it is a regression. I recommend creating a project that reproduces the problem, then filing a bug report with Google.
4 Views