Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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

share|improve this question
3  
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 '10 at 15:40
29  
Please make sure you accept @Jurgen's answer as it is the right answer! – Lazarus Mar 3 '11 at 14:46
show 1 more comment

34 Answers

1 2

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! :)

share|improve this answer

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

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

share|improve this answer
show 5 more comments

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 stupid Android SDK installer working.

BTW, I'm running Win7 x64.

share|improve this answer

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. =)

share|improve this answer

I spent a little over an hour trying just about every option presented. I eventually figured out that I had a lot of stale entries for software that I had uninstalled. I deleted all the registry nodes that had any stale data (pointed to the wrong directory). This included the

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment]

and

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment]

entries as a JRE included in the JDK.

I also got rid of all the JAVA entries in my environmental variables. I guess I blame it on bad uninstallers that do not clean up after themselves.

share|improve this answer

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.

share|improve this answer

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..

share|improve this answer

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!

share|improve this answer
8  
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? :-) – Julian Higginson May 17 '12 at 13:58
6  
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. – Kenton Price May 20 '12 at 1:38
12  
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! – advocate Jul 6 '12 at 20:10
12  
Remembering to restart the installer after adding the ENV Variable. – burrows111 Jul 24 '12 at 8:50
7  
This one worked for me on Win8 x64. Thanks very much! – Zach Sep 29 '12 at 22:21
show 8 more comments

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

share|improve this answer
show 1 more comment

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.

Dont forget the backward slash at the end.

share|improve this answer

install both JDK 64 bit 1.6 for windows and JRE 1.7 64bit for windows.

it worked in my case.

share|improve this answer

In my case problem was in JAVA_TOOL_OPTIONS environment variable. Nothing helps me until I removed it. Hope it help someone!

share|improve this answer

You might want to restart your machine. For me, without having to use forward slashes it worked after I restarted windows.

share|improve this answer

This issue has been fixed on SDK revision 20.xxx

Download it via http://dl.google.com/android/installer_r20.0.3-windows.exe

share|improve this answer
show 2 more comments

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

share|improve this answer

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...

share|improve this answer

I tried several posted solutions and then it took a system reboot before it started working, which may have been because I had just installed the JDK. Here are all the things I had going on - not sure which ones were essential:

  • 64-bit JDK installed.
  • JAVA_HOME defined using forward slashes (/) instead of backslashes ().
  • JDK 'bin' directory listed at beginning of PATH.
  • System reboot.
share|improve this answer

For windows users:

You would set JAVA_HOME environment variable: http://wso2.org/project/wsas/java/1.1/docs/setting-java-home.html

share|improve this answer

It is bug in android installer.Download latest installer and try it.Then it will work.

share|improve this answer

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

share|improve this answer
195  
It sounds silly, but this actually works. – ajlane Feb 25 '11 at 12:43
28  
Works for Windows XP as well. Thanks! – Spidy Feb 28 '11 at 16:02
19  
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 '12 at 13:14
6  
Not a working fix for Windows 7 x64, suggest an edit to the answer to make that clear. – Greg Aug 20 '12 at 2:22
11  
This does not work in Windows 8 – Ibn Saeed Nov 18 '12 at 1:56
show 10 more comments

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.

share|improve this answer

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"
share|improve this answer

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.

share|improve this answer

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 :)

share|improve this answer
1  
This is the only one that worked for me. My value is: C:\Program Files\Java\jdk1.7.0_04 – DefenestrationDay Jun 4 '12 at 1:47
1  
i added C:/Program Files/java/jdk1.7.0 to user variables and set as JAVA-HOME. Worked for me. – Wasswa Samuel Sep 25 '12 at 0:03
show 1 more comment

Warning: As a commenter mentioned, dont try this on a Windows7!!!! I tested it with WinXP-64.

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 etcpp) to solve this on on a Win64. Just add PATH (capital letters!!) to your environment Variables and set the Value to your JDK-Path.

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

I hope for some this might be helpful

share|improve this answer
2  
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 '12 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 '12 at 14:28
show 6 more comments

Press Report error and OK. Next will be enabled.

share|improve this answer
show 1 more comment

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

share|improve this answer
show 1 more comment

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?

share|improve this answer

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.

share|improve this answer

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

share|improve this answer
4  
See the "back and forward" answer. That's the solution. Forget playing with the registry or installing the 32bit. – llappall Jun 16 '11 at 21:35
show 1 more comment
1 2

protected by Robert Harvey Mar 20 '11 at 19:35

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.

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