-1

I am facing this error and after research, I found that I have to install Java 11 or higher after installing it the error still has not gone

enter image description here

enter image description here

and this is the current version of Java that I have installed

enter image description here

enter image description here

and this is JAVA_HOME variable

enter image description here

and i have tried to change the java jdk location but it is still being this path cannot be changed after apply and clicking ok it returned to this path and did not changed

1 Answers1

0

First, you should try to run the warning commands in section "Android toolchain". Seconds, switch to JDK 11 by following the steps in this Android Studio Error "Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8". After done, clear cache & restart Android Studio, then your computer. Hope this help :)

Nguyen family
  • 749
  • 2
  • 12
  • how to do it on vscode because I am using it instead of the android studio? – Mahmoud ashraf Jul 22 '23 at 07:38
  • bro, run the command in Terminal or your integrated VScode terminal. After that open your Android Studio and do as follow. You know, your VSCode cannot run directly Android emulator or iPhone simulator - it must runs through Android Studio & XCode some parts... – Nguyen family Jul 22 '23 at 10:20