I use java.util.Base64.getEncoder() in Kotlin, but on below of Nougat versions doesn't work. I get this error on below of Nougat versions "Failed resolution of: Ljava/util/Base64"
😶 2
m
mkrussel
07/23/2021, 2:09 PM
Base64
was added in Java 8, so you can only use it on API versions that have Java 8.
Android provides desugaring to get a lot of the Java 8 API usable on old devices, but I do not see
Those settings determine the byte code from Kotlin, and the syntax allowed by Java, but not the API that can be used.
Those are part of the JVM that is installed on the device. So you can only use functionality introduced in Java 8 if it is in the list from the link above.