follow these steps: (steps for windows, access to the same directories in case of other operating systems)
Step 1: Press "Win + R", enter "% userprofile%" and press the enter key.
Step 2: Go to the Android Studio folder, which will be in the following format - ".AndroidStudio2.2" (version may vary)
Step 3: Go to the "config \ options" folder.
Step 4: Make a copy of jdk.table.xml on the desktop and delete jdk.table.xml . (Do it while the android studio is still working)
Step 5: In the android -Go studio in "File-> Project Structure" and select the correct jdk path.
If STEP 4 and STEP 5 do not solve the problem, follow these steps:
Step 4 ': Open jdk.table.xml in notepad.
Step 5 ': Find all the words, including the jdk version - for example. find "1.8.0_45"
Step 6 ': Replace the found words; with your current jdk version. E.g. change "1.8.0_45" to "1.8.0_111" (make sure you replace all fields containing the version number)
Step 7 ': Save the jdk.table.xml file
Step 8 ': Restart Android Studio.
This will definitely solve the problem.
PS: JDK must be installed and the path must be installed.
HARSH TYAGI Dec 22 '16 at 18:19 2016-12-22 18:19
source share