Table of Contents

How to solve java version error?

← All Topics

If you open a project in Android Studio and see an error similar to this:

No matching variant of was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute ‘org.gradle.plugin.api-version’ with value ‘7.5’ but:

Solving Error 1

This is a Java version error, to solve this follow the steps below:

  1. Go to menu File -> Settings.Java Error 2
  2. Go to Build, Execution, Deployment -> Build Tools -> Gradle and change Gradle JDK to version 11. Then click Apply and OK.Java Error 3
  3. Sync your project again (press Try Again) or restart your project.