skip to Main Content
[Unsupported Java.
Your build is currently configured to use Java 19.0.2 and Gradle 7.5.

Possible solution:

  • Open Gradle wrapper settings, change distributionUrl property to use compatible Gradle version and reload the project

](https://i.stack.imgur.com/TXiFY.png)

2

Answers


  1. Download and install Java version 19.0.2 from here.

    Then go to Gradle/Wrapper/gradle-wrapper.properties from your root project and set the distributionUrl property to https://services.gradle.org/distributions/gradle-7.5-bin.zip.

    Next, sync your Gradle project in Android Studio.

    Login or Signup to reply.
  2. Apparently Gradle 7.5 doesn’t support Java 19. That fix went into Gradle 7.6.

    So open gradle-wrapper.properties and change the line

    distributionUrl=https://services.gradle.org/distributions/gradle-7.5-bin.zip
    

    to

    distributionUrl=https://services.gradle.org/distributions/gradle-7.6-bin.zip
    

    Changing 7.5 to 7.6.

    Android studio will download the updated Gradle and then you can resync and shouldn’t have any errors. Worked for me at least, hope it does for you too.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search