Android Studio won't recognize my language version...
# android-studio
w
Android Studio won't recognize my language version is 1.4 and the compileKotlin block errors in gradle. I am trying to do a non-suspending lambda conversion to a suspend lambda without marking the function as suspend
j
Copy code
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().all {
    ...
}
or
Copy code
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

tasks.withType<KotlinCompile>().all {
    ...
}
or
Copy code
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

tasks.withType(KotlinCompile::class).all {
    ...
}
w
hmmm ok thnx
i just tested all three of those and they all error-ed for me in gradle
j
change the jdk
w
wdym? like the project structure jdk?
cuz i’m targeting java 8
j
yes, in the project structure
w
hmmm, i was using the jre bundled with android studio i changed it and it still didnt work
I guess I will just mark the lambda as suspending
thanks for all the help guys!