Android Studio installation on Windows 7 fails, no JDK found
Solution 1
Adding a system variable JDK_HOME
with value c:\Program Files\Java\jdk1.7.0_21\
worked for me. The latest Java release can be downloaded here.
Additionally, make sure the variable JAVA_HOME
is also set with the above location.
Solution 2
OK, I figured out how fix this nasty bug.
Before you start
Go to your Android Studio installation folder and locate the bin folder. Inside the bin folder, you will find studio.bat. Execute the file, and it'll show the error. If it is about the Java path then follow the tip 1.
Tip 1
When you set the path JAVA_HOME
, etc., make sure not to include bin
at the end of the path. This solved the issue for me.
JAVA_HOME
=> C:\Program Files\Java\jdk1.7.0_21
path
=> C:\Program Files\Java\jdk1.7.0_21\bin
It works fine with JDK 1.7 (I tried with 32 bit).
If you do so, you can see the initial screen as below.
Tip 2
Are you getting the below error message?
Your Android SDK is out of date or is missing templates. Please ensure you are using SDK version 22 or later.
This error probably occurs, because you have reference to your older SDK (that you downloaded with Eclipse) in your path variable. Go to Environment variables and remove any reference to the old SDK folder and point it to new SDK folder that is found inside the Android Studio installation folder.
Save and restart Studio, things should work as expected now.
Tip 3
If you hate messing around with the path variable as given above by removing old references, simply follow the following steps to refer to new SDK path that comes with Studio.
*Project Defaults* -> *Project Structure* -> Click "New" -> Select "Android SDK" -> Select the SDK
folder inside the studio installation.
Solution 3
With the last update of Android Studio I have two versions of the IDE's launcher
One is called studio.exe and the other studio64.exe they are both on:
C:\Users\myUserName\AppData\Local\Android\android-studio\bin
You have to launch the one that matches your Java version 64 or 32 bit
Solution 4
I had the same issue. I got resolved setting up correctly the environment variables in windows, for instance:
JAVA_HOME -> C:\Program Files\Java\jdk1.6.0_45
path -> C:\Program Files\Java\jdk1.6.0_45\bin
Solution 5
I've tried
so many of the answers here but none of them works
, so I decided to mix some of the answers
here and I am successful!
Step 1: Go to the system properties by right-clicking on My Computer or by pressing windows button on typing This PC
and right clicking on it and selecting Properties
.
Step 2: Click the advanced system settings
or Environment Variables
Step 3: Take note that there are 2 different variable. What you need to create is system variables not user variables
, when you clicked new type the following
Variable name: JAVA_HOME
Variable value: C:\Program Files\Java\jdk1.8.0_25\
(Note: Please check if the path is right, sometimes it is C:\Program Files (x86)\Java\jdk1.8.0_25
)
Step 4: Run the android studio, no need to restart.
Note:
*C:\Program Files\Java\jdk1.8.0_25\
depends entirely on the installation path of your JDK
not JRE
so don't be confused if you see something like the picture below. Just enter the location of your jdk
, in my case it is C:\Program Files\Java\jdk1.8.0_25\
.
*Do not include the bin folder
when you enter the Variable value.
Edit: For Windows 8 and 10 Users: Try to run C:\Program Files\Android\Android Studio\bin\studio.exe
instead of C:\Program Files\Android\Android Studio\binstudio64.exe
Jaison Brooks
Just {a.New} Developer, trying to make c[0,0]l things... SOreadytohelp
Updated on July 08, 2022Comments
-
Jaison Brooks almost 2 years
I downloaded Android Studio and attempted to launch the program.
This is running on Windows 7 64-bit with Java 1.7. During the installation my Java 1.7 is detected, and the rest of the installation goes through just fine. However, when attempting to launch the application from the desktop icon, nothing happens. Looking at the task manager, a new process from the CMD is loaded. This is because it's attempting to run the batch file
studio.bat
.When I execute via CMD, I get the following error:
ERROR: cannot start Android Studio. No JDK found. Please validate either ANDROID_STUDIO_JDK, or JDK_HOME or JAVA_HOME points to valid JDK installation. ECHO is off. Press any key to continue . . .
I've attempted to open the
idea
properties file to see if there was something I could configure for thisANDROID_STUDIO_JDK
or something like that. However, I found nothing. I hope some of you can let me know if you were able to install this or if you are having problems as well. -
kaderud about 11 yearsI can confirm that
Android Studio
works with JDK 1.7 as I have just verified it. And it's probably a good thing to set the system environment variable JDK_HOME (if not JAVA_HOME is set) to point to the installation of the Java JDK. -
Ruben Weerts about 11 yearsThis is the solution +1. Thank you very much
-
Jay Mayu about 11 yearsI too have jdk 1.7 but it doesn't launch. Wondering something to do with 64 bit.
-
Jaison Brooks about 11 yearsAndroid Studio now launches successfully. Thank You
-
Jaison Brooks about 11 yearsAre you able to create project's, I have attempted to create a project and get the following error "Your Android SDK is out of date or is missing templates. Please ensure you are using SDK version 22 or later."
-
Jaison Brooks about 11 yearsIt seems that i am able to import existing projects and work on them. However unable to create new projects. I also configured the SDK location in the Android studio to my existing SDK instead of the one that came in the Android Studio bundle.
-
Jay Mayu about 11 yearsYep same here. I don't know may be its an issue due to the existing Android SDK we downloaded.
-
kaderud about 11 yearsJust update the Android SDK, you need revision 22 for SDK Tools and rev. 17 for Platform/Build-tools.
-
Konrad Morawski about 11 years+1. @ssuperz28 that's how Google is :) like first three releases of Google Chrome that I tried (not literally 1.0, 2.0, 3.0, but I tried them some weeks apart) would crash on me straight away. It's easy to forget now that their browser didn't even have print option in its humble beginnings
-
Jaison Brooks about 11 yearsIm no longer getting the Android SDK is out of date, I have the most recent SDK that i previous had configured with Eclipse. However with using the Android Studio i want to configure it to see that SDK. Im having a issue where it doesnt recongize it for all the SDK related buttons in the program. See my other thread here. stackoverflow.com/questions/16576960/…
-
Jesse O'Brien about 11 yearsI needed to set JAVA_HOME. JDK_HOME was set but JAVA_HOME was not. I set JAVA_HOME to C:\Program Files\Java\jdk1.7.0_21\ and it started up.
-
KaHeL about 11 yearsWell just in case you are not familiar on how to setup your JAVA_HOME you can read this link confluence.atlassian.com/display/DOC/… Big thanks for this solution! :)
-
Jay Mayu about 11 years@chrkad Android Studio by default comes with 22. will check updating the sdk that came with eclipse.
-
Milan about 11 yearsThis worked for me with 64 bit windows 7 and JDK version 1.7.0_21.
-
Jay Mayu about 11 years@Carlo did you follow the steps mentioned above?
-
ASeale about 11 years+1 This MOSTLY worked for me. I am running 64 bit windows and JDK 1.7.0. I tried adding both JDK_HOME and JAVA_HOME with "c:\Program Files\Java\jdk1.7.0\". It still would not load. However, I capitalized the "C" and removed the trailing slash and it works now: "C:\Program Files\Java\jdk1.7.0"
-
AndyD273 about 11 yearsI had to go into system32 and rename java.exe to java.exe.old before it would see my JAVA_HOME path
-
jeffa00 about 11 yearsFor me it ignored the JAVA_HOME and JDK_HOME until I shut down the cmd and restarted it. Guessing it re-read the env vars and picked it up at that point. Had tried from cmd and just the old pointy-clicky in windows explorer.
-
Carlo about 11 years@MayuMayooresan yeah I did. What I had to do was to re-install everything. I think the problem with this came out of another problem I was having. The first problem was when installing the studio, it said that I didn't have the JDK (but I did), so a solution that I found was to uninstall x64 and install x86 - that fixed the first problem, but I think it caused the second one. So what I had to do was uninstall everything (studio, JDK and ADT), and re-install (this time x64 JDK) and of course remap the system variables. That did the trick and I was able to do a hello world app =) Thanks!
-
Oleg Kislitsyn about 11 years@Alberto, maybe you didn't set path variables?
-
Alberto Rubini about 11 yearsi've set only JAVA_HOME variable
-
Tony Brix about 11 yearsMake sure you restart cmd after changing the environmental veriable. I was pulling my hair out for about 10 minutes trying to get it to work when finally I restarted cmd and it worked.
-
Zsolt Safrany almost 11 yearsWin7, 64bit. I had to run the installer "As Administrator" and then it worked.
-
Simon Dorociak almost 11 yearsI have Win 7 (64 bit). I installed Android Studio and then set
JAVA_HOME
enviroment variable but it didn't work. So i had to unistall and install again Android Studio and then it worked. -
TrippinBilly almost 11 yearsInstalling the latest JDK and setting JAVA_HOME did not work for me. I had to install a Visual C++ package and that solved the issue. blog to solution
-
gmn almost 11 yearsJust an additional note, I had to reboot my PC before the environment variable(s) were picked up by the installer. I set JDK_HOME, JAVA_HOME and ANDROID_STUDIO_JDK all to the path to JDK. After that it installed and worked.
-
Edwin Yip almost 11 yearsI had to also delete the JavaSoft registry key, as described here:stackoverflow.com/a/11603113/133516, in order to get the installer proceed.
-
IgorGanapolsky over 10 years@EdwinYip Yes, deleting all Javasoft registry entries did the trick for me!
-
samael over 10 yearsIt's worth noting that some tools don't like the space in 'Program File' so on Windows it's best to set your
JAVA_HOME
variable using the abbreviated format:C:\Progra~1\Java\jdk1.7.0_21
There's no need to have JDK_HOME and JAVA_HOME, just using JAVA_HOME is fine. -
mammadalius over 10 yearsThis solution is the RIGHT one. The point is APPENDING the bin folder path to the "path" in the Environment Variables
-
Thomas about 10 yearsWorked on 64-bit Windows 8 as well! Thanks!
-
B. Clay Shannon-B. Crow Raven about 10 years@2-Stroker: To your question, "Has anyone tried with 1.6, is 1.7 a requirement ?" I don't know about 1.6, but I just did it with 1.8.0
-
Damir almost 10 yearsJuts one more clarification: Android studio installer by default set shortcut to studio64.exe by default on Windows 7 64bit even my JDK is 32bit. When I changed shortcut to target "C:\Program Files (x86)\Android\android-studio1\bin\studio.exe" everything works OK.
-
eugene almost 10 yearsYes, indeed, one needs to match studio.exe with 32bit JDK (JAVA_HOME) or studio64.exe with 64bit JDK (JAVA_HOME). Since I use 32 bit JDK for Eclipse I wish I could have two environments: 32 for eclipse and 64 for studio (I recall Python had a solution of virtual machine (or env) and one could toggle easily between 'profiles'.
-
surt91 over 9 yearsAlso important: do not sourround the path in quotes "C:/Pro...". That might be obvious for some, but unfortunately not for me.
-
Sankar V over 9 yearsDo not add ; at the end
-
Frank Martin over 9 yearsI tried your suggestion and I am seeing a lot of entries in process monitor for Android Studio process. For many entries it is showing "NAME NOT FOUND" in "Result" column. What to do now?
-
ecnepsnai over 9 yearsI also found that I had to open
studio64.exe
and notstudio.exe
to get it to run. -
Razor about 9 yearsI had the same issue. It's because you're running studio64.exe instead of studio.exe. If you have JDK x86 installed then you need to run 32bit version of studio.
-
inyourcorner almost 8 yearsI ended up having to remove the double-quotes around my JAVA_HOME and JDK_HOME. In my environment properties, this:
JAVA_HOME
:"C:\Program Files\Java\jdk 1.8.0_101"
became:JAVA_HOME
:C:\Program Files\Java\jdk 1.8.0_101
(notice the lack of"
in the latter) -
inyourcorner almost 8 yearsFWIW I also added
%JDK_HOME%\bin%
toPath
System variable list, and%JDK_HOME%
toPath
in my User variable list. I don't know if that's necessary, but once I got it working with everything I just went with it.