Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

257
Visualizações
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8

I'm trying to use a physical Android device to test/debug my React Native project.

I connected the device to my Windows 11 machine via USB and turned on Developer mode on the device but when I tried to run my project, I got an error stating the following:

Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.

I downloaded and installed Java version 11 from this URL: https://jdk.java.net/java-se-ri/11

I then tried to set the version through: Android Studio > File > Settings > Build, Execution, Deployment > Gradle > Gradle JDK

I also went into Environment Variables on my Windows 11 machine and pointed JAVA_HOME to the folder where Java version 11 is.

But no matter what I do, it doesn't work. If I run ./gradlew --version under Android folder, I see the following: enter image description here

Any suggestions how to handle this and set the correct version of Java for Gradle in my React Native project?

P.S. Even if I try to use the Android simulator on my dev machine, I now get the same error i.e. asking for Java 11. So, at this point, I'm completely unable to run any -- even a brand new -- React Native project on an Android device or the simulator.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

An easier solution might be to set the org.gradle.java.home variable in gradle.properties file. To do that:

  1. Locate the gradle.properties file in your project directory, create one if it's not present.
  2. Add the variable like this
org.gradle.java.home = path/to/java11

Remember, no quotation marks in the path. And, point it towards the Java Installation directory, and not the bin folder.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda