If I create a brand new kotlin project using Android Studio 3.0 (jre7 kotlin).
Then put into onCreate()
val map = mapOf(“a” to “b”)
Then deploy to a device with API level 21 (not supporting java8).
It results in a crash:
How do I avoid putting broken code like this into production?
There are no warnings in Android Studio. I would have thought having a jre7 kotlin dependency would know to not attempt to call a java8 method?
I don’t really want to be writing code and having to second guess which methods will really work.