Android SDK installation doesn't find JDK

If the Android SDK installation is unable to find the JDK (Java Development Kit), it could be because the JDK is not installed or is not installed in the default location.

To fix this issue, you have a few options:

  1. Install the JDK: If you do not have the JDK installed, you can download and install it from the Oracle website: https://www.oracle.com/java/technologies/javase-downloads.html

  2. Set the JAVA_HOME environment variable: If you have the JDK installed but it is not in the default location, you can set the JAVA_HOME environment variable to point to the location of the JDK. To do this, follow these steps:

  3. Open the Control Panel and go to "System and Security > System > Advanced System Settings".

  4. Click on the "Environment Variables" button.

  5. Under "System Variables", scroll down and find the "JAVA_HOME" variable. If it does not exist, click the "New" button to create it.

  6. Set the "JAVA_HOME" variable to the location of the JDK installation. For example: C:\Program Files\Java\jdk1.8.0_251

  7. Click "OK" to save the changes.

After setting the JAVA_HOME environment variable, you should be able to install the Android SDK successfully.

Note: If you are using a 64-bit version of the JDK, you may also need to set the JAVA_HOME variable to the location of the JDK's "bin" folder, rather than the root of the JDK installation. For example: C:\Program Files\Java\jdk1.8.0_251\bin