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:
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
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_HOMEenvironment variable to point to the location of the JDK. To do this, follow these steps:
Open the Control Panel and go to "System and Security > System > Advanced System Settings".
Click on the "Environment Variables" button.
Under "System Variables", scroll down and find the "JAVA_HOME" variable. If it does not exist, click the "New" button to create it.
Set the "JAVA_HOME" variable to the location of the JDK installation. For example:
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: