Your build is currently configured to use incompatible Java xx.x

Spread the love

It happens because the project is having a Gradle version which is incompatible with the Java version selected in the android studio. As of writing this the default android installation comes with Java 21 as configured java.

The solution is to download the version of Java that your project supports (for react native it’s Java 17). Add it’s bin folder path to environment variable. Then change the SDK

Settings -> Build,Execution,Deployment -> Build tools -> gradle -> Gradle jdk -> choose Java version based on your gradle version.

And now simply sync the gradle.

Helpful links:

Gradle Distributions

Compatibility Matrix (gradle.org)

Cheers and Peace out!!!

Leave A Reply

Your email address will not be published. Required fields are marked *