skip to Main Content

while I executed the command ./gradlew signingReport I executed command to get SHA-1 it gave me
Android Gradle plugin requires Java 11 to run. currently using Java 1.8.

I tried to create the new variable for JAVA_HOME but it did not work since it was one of the recommendations by Android Studio Terminal.

2

Answers


  1. Chosen as BEST ANSWER

    Just Download The jdk11 and add org.gradle.java.home=pathjdk11 to the gradle.properties file in your project


  2. In such cases, it’s best to use the latest versions that are supported. So you should consider downloading JDK 17, create a the JAVA_HOME variable and set the compile options inside Android Studio:

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
    

    If you’re using Kotlin, you should also set the Kotin options:

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_17
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search