Home > Software engineering >  Android Studio seems to be stuck at Java 8
Android Studio seems to be stuck at Java 8

Time:09-03

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:

enter image description here

enter image description here

When I type gradlew --version it seems to be java 18. (The version I would like to use, if it were supported)

enter image description here

But even after multiple reloads, restarts, cleans and synchronizations the IDE still behaves as if I would use Java 8.

enter image description here

  • 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.

  • Related