0

I just installed new version of Android IDE today on my

D:\program file\Android

and installed java 1.5.0_6 JDK on C drive. I pointed out this path in a system environment

JAVA_HOME C:\Program Files\Java\jdk1.5.0_06\ ( user veriable)

JAVA_HOME C:\Program Files\Java\jdk1.5.0_06\jre\bin\javaw.exe ( system veriable)

after that image getting an error please check this image.. enter image description here

Community
  • 1
  • 1
pankaj
  • 1
  • 17
  • 36
  • Explain why are you installing a JDK that is [End Of Life](https://www.java.com/en/download/faq/java_5_eol.xml) for more than 10 years? – Morrison Chang Mar 06 '20 at 19:19
  • because when i completed and run IDE then it starts asking about VM. I l am PHP developer. so no need of java. so i never used JDK form 10 years... only used for PHPStrom because that asks this. – pankaj Mar 07 '20 at 08:40
  • Please go through [Android Studio installation on Windows 7 fails, no JDK found](https://stackoverflow.com/q/16574189/295004) and if still not working update your question with OS version and what steps you tried. – Morrison Chang Mar 07 '20 at 08:50
  • thanks to your comment.. i have installed a new version of JDK-8 update-241 to parent site.. i hope it will work for me. – pankaj Mar 07 '20 at 09:20

2 Answers2

6

If you added some custom vmoptions then you can simply edit them with proper versions or better delete them.

go to C:\Users\%USERNAME%\AppData\Roaming\Google\AndroidStudiox.x

and spot the file named

studio64.exe.vmoptions

If you know how to edit it correctly which depends on the version of Android Studio, JDK and other aspects then edit it, in my case I just deleted it.

Restart your Android Studio.

Ketan Ramteke
  • 10,183
  • 2
  • 21
  • 41
  • 1
    In my case my JAVA_HOME was set to use JRE(Java Runtime Environment) instead of the required JDK(Java Development Kit, more tooling than JRE). I just downloaded JDK 8 and updated my JAVA_HOME. JDK8 https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html – Francois Aug 05 '21 at 11:06
  • Thanks for commenting and improving the answer. – Ketan Ramteke Aug 05 '21 at 11:46
0

I was using old JDK. so that i was getting error. so use JDK-1.8.* for fix this problem. In my case i tried many versions then i got success 1.8.

pankaj
  • 1
  • 17
  • 36