This declaration is only available since Kotlin 1.5 and cannot be used with the specified API version 1.4
even though in my
build.gradle.kts
i have
kotlin("jvm") version "1.5.21"
whats wrong here?
j
Joffrey
10/29/2021, 2:06 PM
Do you get this error in project files, or in the Gradle build kts file itself? If the latter, gradle's DSL still is at Kotlin 1.4 I believe. If the former, maybe you have another language level override somewhere in the build file?
l
lhwdev
10/31/2021, 8:54 AM
If you use Jetpack Compose, make sure to set kotlinCompilerVersion and kotlinCompilerExtensionVersion. (not sure the name)
(I struggled a lot for this)