I'm trying to update the jdk of an AndroidStudio-App to the newest possible version (From what I've read jdk11
).
I have changed the build.gradle
to:
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
The version in the settings seems to be 11:
When I type gradlew --version
it seems to be java 18. (The version I would like to use, if it were supported)
But even after multiple reloads, restarts, cleans and synchronizations the IDE still behaves as if I would use Java 8.
- Android Studio Version: Chipmunk | 2021.2.1 Patch 2
- Gradle Version: 7.5.1
CodePudding user response:
I have now found this thread which explains that even the new versions of Android Studio simply don't support all features of Java 11.