1243

I'm trying to install the Android SDK on my Windows 7 x64 System.

jdk-6u23-windows-x64.exe is installed, but the Android SDK setup refuses to proceed because it doesn't find the JDK installation.

Is this a known issue? And is there a solution?

SDK Error

10
  • What do you mean by "the Android-SDK-Setup refuses to proceed"? AFAIK, installing android-sdk_r07-windows.zip is simply unzipping it to a folder (e.g. C:\android-sdk-windows) and appending that folder to the %PATH% environment variable. Please clarify, so that we can help you better. Dec 7, 2010 at 22:37
  • 5
    I'm having the same problem with installer_r08-windows.exe (which is the "recommended" download). Setting JAVA_HOME doesn't seem to help. I suppose I'll try the zip file next...
    – Hans Nowak
    Dec 13, 2010 at 15:40
  • @AndroidEve: The Android SDK (maybe not the ADT) for Windows is an EXE file, for example installer_r22.0.1-windows.exe
    – RenniePet
    Jul 9, 2013 at 20:06
  • 1
    I marked Lazarus- comment as useful, but it isn't! That solution won't work on Windows 8!
    – Mark
    Jul 10, 2013 at 11:52
  • the solution from Jules Colle + setting JAVA_HOME environment is working on my Windows 7 64 bit.
    – duchuy
    Jan 15, 2014 at 8:37

45 Answers 45

1258

Press Back when you get the notification and then Next. This time it will find the JDK.

18
  • 1
    Wah I re-downloaded JDK installer on my slow line only to realise that I DO HAVE JDK installed! And this worked thanks!
    – yihtserns
    Mar 20, 2011 at 7:31
  • 42
    Doesn't work for me on Windows 7 x64. I'm not joking. I set JAVA_HOME and I tried clicking back and next several times, but it's still not working. Neither does running SDK Manager.exe from the archive and I am positive I have JDK 7 installed (even ran the installer again and it told me it's already installed).
    – f.ardelian
    Mar 25, 2012 at 13:14
  • 15
    Not a working fix for Windows 7 x64, suggest an edit to the answer to make that clear.
    – Greg
    Aug 20, 2012 at 2:22
  • 1
    I've tried setting JAVA_HOME to [...]system32/java.exe, C:\Program Files\Java\jdk1.7.0_09\bin\java.exe and just C:\Program Files\Java\jdk1.7.0_09 but the installer still doesn't recognise it. I have tried going back nad forth as descirbed several times. Also useing Win7 64bit Oct 27, 2012 at 16:44
  • 7
    Setting JAVA_HOME to C:\Program Files\Java\jdk1.7.0_17 worked for me (of course you need to restart the installer for changes in environment variables to take effect; back and forth won't work for that).
    – PeterT
    Apr 10, 2013 at 13:13
284

Actual SETUP:

  • OS: Windows 8.1
  • JDK file: jdk-8u11-windows-x64.exe
  • ADT file: installer_r23.0.2-windows.exe

Install the x64 JDK, and try the back-next option first, and then try setting JAVA_HOME like the error message says, but if that doesn't work for you either, then try this:

Do as it says, set JAVA_HOME in your environment variables, but in the path use forward slashes instead of backslashes.

Seriously.

For me it failed when JAVA_HOME was C:\Program Files\Java\jdk1.6.0_31 but worked fine when it was C:/Program Files/Java/jdk1.6.0_31 - drove me nuts!

If this is not enough, also add to the beginning of the Environment Variable Path %JAVA_HOME%;

Updated values in System Environment Variables:

  • JAVA_HOME=C:/Program Files/Java/jdk1.8.0_11
  • JRE_HOME=C:/Program Files/Java/jre8
  • Path=%JAVA_HOME%;C:...
18
  • 10
    YES!!! this one worked for my win 7 pro 64 bit install with android r18 exe installer. You, sir, are my hero for today. Now I just need to know how on earth you thought to even try that? :-) May 17, 2012 at 13:58
  • 9
    I guessed that the likely Windows haters that coded this never bothered to actually test it, and their Unix forwardslashes weren't converted to Windows backslashes. May 20, 2012 at 1:38
  • 38
    Almost gave up because NOTHING was working, including this solution. My problem however was I was trying to be too smart! I had JAVA_HOME set to C:/Program Files/Java/jdk1.7.0_03/BIN but you DON'T need to include the /bin!!! Just remove it and you'll be good! Jul 6, 2012 at 20:10
  • 27
    Remembering to restart the installer after adding the ENV Variable.
    – theiOSDude
    Jul 24, 2012 at 8:50
  • 1
    Setting the JAVA_HOME worked for me under Win8 (C:\Program Files\Java\jdk1.7.0_10). Dont forget to reboot after setting the JAVA_HOME
    – gurehbgui
    Jan 7, 2013 at 13:51
99

I found the solution and it's beautifully stupid. I found Android SDK cannot detect JDK.

Press the Back button on the SDK error screen that tells you that the EXE couldn't detect the JDK. Then press Next.

Who would have thought that would happen?

1
88

It seems like it doesn't work without 32 bit JDK. Just install it and be happy...

5
  • Hmmm... I did the same but it didn't work for me. Perhaps there is an additional step that needs to be done? Dec 19, 2010 at 12:34
  • 9
    I have actually just had the same problem with the 32 bit JDK
    – Vintharas
    Feb 28, 2011 at 15:22
  • 3
    I'm trying to install the Android SDK with "installer_r20-windows" and it STILL refuses to accept the 64bit JDK as legitimate, even after setting the JAVA_HOME env. var. GOOGLE: FIX IT !! Jul 13, 2012 at 18:54
  • 1
    I had installed the Java SDK x64. It appears the Android SDK is x32. Nice one google, can you be clearer next time?
    – Valamas
    Oct 9, 2012 at 21:57
  • 1
    Worked for me, Win7 64bit. Tried the other solutions to no avail. Oct 27, 2012 at 17:30
32

I downloaded the .zip archive instead and ran SDK Manager.exe, and it worked like a charm. You had the same issue with the .exe otherwise.

28

Warning: As a commenter mentioned, don't try this on a Windows 7! I tested it with Windows XP 64 bit.

As the posted solution does NOT work for all (including me, myself, and I), I want to leave a note for those seeking for another way (without registry hacking, etc.) to solve this on a Windows 64 bit system. Just add PATH (capital letters!!) to your environment Variables and set the value to your JDK-Path.

I added JDK to the existing "Path" which did not work, like it didn't with JAVA_HOME or the "Back"-Solution. Adding it to "PATH" finally did the trick.

I hope this might be helpful for somebody.

10
  • I've tried all the other answers, except for this one. I'll give this a shot and report back in a couple of days.
    – f.ardelian
    Apr 9, 2012 at 13:43
  • check, right.. old and simple java class path variable ;=)))))) ps.: thx, found it via google and wanted to post it myself.. :) the dialog actually say you should do it ;) nobody reads today
    – cV2
    Apr 16, 2012 at 0:11
  • 5
    It seems that environment variable names are case insensitive on Windows 7, so when I added a 'PATH' variable it overwrote the 'Path' variable. Just a warning for anyone else who tries the same thing!
    – Ian Newson
    May 2, 2012 at 11:12
  • 1
    Still didn't work for me, wonder what is wrong :( I already have the Path variable, I changed it to PATH and appended my jdk path "C:\Program Files\Java\jdk1.7.0_05\bin" to it (w/o the quotes), then tried to install android sdk, still wouldn't proceed :(
    – wliao
    Jun 26, 2012 at 14:28
  • 3
    This worked for me, with one extra step. I had to rename the java.exe file in c:\windows\system32 to something else (java.exe.old for me). This made it actually check the JDK directory, and it was able to resolve it. Sep 9, 2012 at 17:17
20

All you need are the following two registry entries. It appears as if whoever posted the other registry stuff basically just copied all the keys from HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft into HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft, which obviously isn't an ideal solution because most of the keys aren't needed.

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Development Kit]
"CurrentVersion"="1.6"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Development Kit\1.6]
"JavaHome"="C:\\Program Files\\Java\\jdk1.6.0_23"
20

Non of these solutions worked for me. I fixed it by temporarily changing the filename of C:\Windows\System32\java.exe to java_.exe

3
  • 1
    This worked in my 64 bit windows 7 with jdk7x64bit and the 20.0.3 installer Nov 28, 2012 at 17:12
  • WOW! Worked perfect under Windows 7 x64 without 32-bit JDK! Thanks a lot :)
    – Sdghasemi
    Feb 6, 2015 at 15:05
  • Thanks! Worked for me. Crazy - what gives with all this bugginess for installing these tools on Windows?
    – mg1075
    Oct 8, 2015 at 6:13
19

None of the solutions here worked for the 64-bit version.

Putting the JDK path before the c:\windows\system32\ path in your environment variables solves the problem. Otherwise the 32-bit java.exe is found before the 64-bit JDK version.

4
  • Too many java's in the path I suppose... Shouldn't it be the same java.exe in both cases though?
    – SeanJA
    Apr 15, 2012 at 21:11
  • @SeanJA there are cases where you have java installed as 32 bit and 64 bit and you have to make sure it points at first to the 64 bit version
    – Pascalius
    Apr 16, 2012 at 12:11
  • I didn't think java would be installed by default on a new windows machine... but there I go assuming again...
    – SeanJA
    Apr 18, 2012 at 15:31
  • This solution worked for Windows8 x64. Tried everything else above with no luck. Apr 10, 2014 at 15:01
17

After reading a couple of blog posts, it does seem to be even an easier fix by clicking BACK when the installer says couldn't find the JDK, and then simply click NEXT again and magically it finds the JDK. No registry messing around or re-downloading etc..

15

Adding JAVA_HOME environment variable (under System Variables) did the trick for me. Clicking "Back" and "Next" buttons didn't work.

Windows 7 Professional x64, JDK 1.7.0_04 (64 bit, I don't have x86 version installed)

I think that installer tries to find JDK in specific (1.6?) version and if it can't find it, checks JAVA_HOME which was not set in my case. I have another computer (the same system but with JDK 1.6 x64) and it worked without JAVA_HOME variable.

You don't have to install 32 bit version of JDK :)

3
  • 1
    This is the only one that worked for me. My value is: C:\Program Files\Java\jdk1.7.0_04 Jun 4, 2012 at 1:47
  • 1
    i added C:/Program Files/java/jdk1.7.0 to user variables and set as JAVA-HOME. Worked for me. Sep 25, 2012 at 0:03
  • This is the CORRECT way. Works fine for ma machine win7 64 bit. without JDK 32bit.
    – Jashan PJ
    Oct 17, 2012 at 11:44
11

I copied the Java.exe from

C:\Windows\System32

to

C:\Windows\SysWOW64

and it worked.

I'm using 64 bit Windows 8.

2
  • You, sir, are a life saver. Can't believe these ridiculous issues still exist close to a year later Nov 6, 2014 at 2:35
  • Agreed you are a life saver.Thanks
    – taha027
    Jun 14, 2015 at 9:18
8

Setting the JAVA_HOME environment variable to

C:\Program Files\Java\jdk1.7.0_07

instead of

C:\Program Files\Java\jdk1.7.0_07\bin

fixed it for me.

1
  • This is the one that worked for me. I had already set the environment variable, clicked back and then next, no prevail. This seemed to work. For anyone else that might be having issues, I'm using Windows 8.1, and Java JDK/JRE 8. After clicking next, it goes back to /system32/java.exe and says it was found.
    – joshft91
    May 3, 2014 at 23:06
8

The guy above who put this: "I experienced this problem too, but none of the answers helped. What I did, I removed the last backslash from the JAVA_HOME variable and it started working. Also, remember not to include the bin folder in the path." This was in fact the correct answer.

For this SDK to install this is what I did. I am running the latest Microsoft OS Windows 8.

User Variables:

Path C:\Program Files\Java\jdk1.7.0_07\bin

Environment Variables

Create these two:

CLASSPATH %HOME_JAVA%\jre\lib

HOME_JAVA C:\Program Files\Java\jdk1.7.0_09

This one already exists so just edit:

Path At this end of WindowsPowerShell\v1.0\ simply add ";C:\Program Files\Java\jdk1.7.0_09"

This is what I did and it worked for me. =)

1
  • It worked. I was actually adding bin in the JAVA_HOME path end as well but removing it worked Dec 18, 2018 at 17:44
7

This registry fix worked like a charm on my Windows 7 x64 setup: http://codearetoy.wordpress.com/2010/12/23/jdk-not-found-on-installing-android-sdk/

1
  • 2
    at the bottom, "click back", "click next" the button is now enabled Apr 11, 2011 at 12:31
7

Press Report error and OK. Next will be enabled.

0
6

Try downloading and installing the zipped version rather than the .exe installer.

1
  • this is the biggest pile of crap fix up issue i ever seen. Its like people are trying hundred different things, one things works here and not there. Why is this such an issue esp if its from the so called big tech company "Google". I think they need to invest in fixing up their crap. rather than making autodriving cars and stuff. My setup still doesnt work. when i install the SDK it says it has found the JDK in correct folder but then the SDK manager just doesnt open no matter what! on my other PC works fine. with same setup and machine Sep 29, 2015 at 22:30
6

Also, RUN AS ADMINISTRATOR! Worked for me with backslash fix.

5

I had the same problem, tried all the solutions but nothing worked. The problem is with Windows 7 installed is 64 bit and all the software that you are installing should be 32 bit. Android SDK itself is 32 bit and it identifies only 32 bit JDK. So install following software.

  1. JDK (32 bit)
  2. Android SDK (while installing SDK, make sure install it in directory other than "C:\Program Files (x86)", more probably in other drive or in the directory where Eclipse is extracted)
  3. Eclipse (32 bit) and finally ADT.

I tried it and all works fine.

4

I had the same problem and solved it by installing the x86 version of the JDK (on Windows XP x64).

1
  • You don't have to do this. Check my answer above :) Oct 18, 2012 at 19:51
4

I experienced this problem too, but none of the answers helped. What I did, I removed the last backslash from the JAVA_HOME variable and it started working. Also, remember not to include the bin folder in the path.

4

Android SDK is 32 bit app, and it requires the 32 bit of JDK to work... the 64 bit JDK won't make any use for it...

4

1-Simply done the "JAVA_HOME" environment variable thing.

2-Right-Click on Android SDK and from compatibletiy Tab Select windows 7 and administrator.

3-Run it again.

0
4

WORKING SOLUTION AND NO REGISTRY MODIFY NEEDED

Simply put your java bin path in front of your PATH environment.

PATH before

C:\Windows\system32;C:\Windows\%^^&^&^............(old path setting)

PATH after

C:\Program Files\Java\jdk1.6.0_18\bin;C:\Windows\system32;C:\Windows\%^^&^&^............(old path setting)

And now the Android SDK installer is working.

BTW, I'm running Win7 x64.

3

For installer_r21.1-windows.exe on Windows 8 x 64 what worked for me was setting up my user environment variable JAVA_HOME to C:\Program Files\Java\jdk1.7.0_10. Hope this helps you all! :)

2

Yeah install the 32 bit version of the Java SE SDK (or any of the combinations). That should help solve your problem.

2
  • 4
    See the "back and forward" answer. That's the solution. Forget playing with the registry or installing the 32bit.
    – llappall
    Jun 16, 2011 at 21:35
  • @llappall It doesn't work in some cases. Read my answer above ;) Jun 5, 2012 at 22:14
2

I'm running a 64-bit version of Windows 7 and I was getting this issue when attempting to install Android Studio 1.0 using the executable from:

http://developer.android.com/tools/studio/index.html

I tried all the listed solutions and several different versions of JDK 1.7 and 1.8 -- no dice. I went with installing the zipped version of the application and it worked like a charm:

http://tools.android.com/download/studio/canary/latest

Still baffled by this problem; especially since beta versions of Android Studio worked just fine.

2

The above methods did not work for me in Windows 8 Pro.

Just set the path to

C:\Program Files\Java\jdk1.7.0_07\

Where C is your drive in which you have installed the JDK.

Don't forget the backward slash at the end.

2

4 Different Solutions:

1) If you get above screen, just click BACK button and from previous screen click NEXT button. Actually silly, but sounds good.

2) Download SDK Manager .zip format instead of .exe and then try to install. It’s all so silly, but work like a charm.

3) If you installed 64 bit JDK means, just uninstall that and install 32-bit JDK.

4) You have to change that as following,

JAVA_HOME=C:/Program Files/Java/jdk1.8.0_11
JRE_HOME=C:/Program Files/Java/jre8
Path=%JAVA_HOME%;C:…
1

You will have to download the 32-bit SDK version because Win7 64-bit is not supported only Windows Server 2003 has a supported 64-bit version. During the download of Java SDK pick "Windows" as your platform and not "Windowsx64".
Once I did this android SDK installed like a charm. Hope this helps.

2
  • 6
    Nope. Just do the back-and-forward as explained above.
    – llappall
    Jun 16, 2011 at 21:35
  • no i have a pc where i uninstalled ALL jave jdk and jre installs, then installed ONLY 64 but JDK and JRE . and the SDK Manager worked with no probs. on my other PC i used same method and no it does not work Sep 29, 2015 at 22:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.