安装的 Android SDK 不能找到 JDK

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

转载于:https://stackoverflow.com/questions/4382178/android-sdk-installation-doesnt-find-jdk

csdnceshi50
三生石@ This solution works perfectly for me: Click Here
4 年多之前 回复
csdnceshi64
游.程 Its' such a shame that an official compiler contain such basic bugs.
4 年多之前 回复
csdnceshi77
狐狸.fox Related: Android SDK doesn't find JDK
大约 5 年之前 回复
csdnceshi54
hurriedly% answer is wrong. Silly Back-Next just doesn't work
5 年多之前 回复
csdnceshi61
derek5. Simplest way, open tools/android.bat file, find the line says "set java_exe", change it to "set java_exe=ABSOLUTE_PATH_TO_YOUR_JAVA_EXE" and comment out the two following lines;
6 年多之前 回复
csdnceshi73
喵-见缝插针 the solution from Jules Colle + setting JAVA_HOME environment is working on my Windows 7 64 bit.
6 年多之前 回复
csdnceshi58
Didn"t forge I marked Lazarus- comment as useful, but it isn't! That solution won't work on Windows 8!
大约 7 年之前 回复
csdnceshi52
妄徒之命 The Android SDK (maybe not the ADT) for Windows is an EXE file, for example installer_r22.0.1-windows.exe
大约 7 年之前 回复
weixin_41568174
from.. 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...
接近 10 年之前 回复
csdnceshi70
笑故挽风 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.
接近 10 年之前 回复

30个回答

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:...
csdnceshi60
℡Wang Yan Works on Win10 x64. ths sooooo much.
4 年多之前 回复
csdnceshi56
lrony* This works on Win7 x64 ;) tks
5 年多之前 回复
csdnceshi77
狐狸.fox This works on Win8 x64. Close the installer and restart it after messing with PATH and JAVA_HOME !
大约 6 年之前 回复
weixin_41568183
零零乙 I added the path to the JAVA_HOME environment variable. The back/next trick didn't work for me, but restarting the installer executable did.
大约 6 年之前 回复
weixin_41568134
MAO-EYE Awesome. I tried all other ways but nothing works until I tried this "silly" trick. Works brilliantly on Windows 7 x64
6 年多之前 回复
csdnceshi52
妄徒之命 Mine worked with backward slashes(\) but I had to put a backward slash(\) at the end of the path even, for example C:\Program Files\Java\jdk1.7.0_10\
6 年多之前 回复
weixin_41568126
乱世@小熊 Worked for me on Windows 8.1, on next step I got full path to java like this C:/Program Files/Java/jdk1.7.0_51\bin\java.exe!
6 年多之前 回复
weixin_41568127
?yb? this one worked for me on Windows 8.1 RTM, most voted answer (press back and next again) didnt work
接近 7 年之前 回复
csdnceshi65
larry*wei back-next wasn't needed in my case, forward slashes fixed the issues (win 7 x64 ultimate)
7 年多之前 回复
csdnceshi50
三生石@ Also, you cannot have any quotation marks. That burned me.
7 年多之前 回复
csdnceshi51
旧行李 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
7 年多之前 回复
weixin_41568131
10.24 Amazing!!! They seriously should do something about this dumb forward slash problem!
接近 8 年之前 回复
csdnceshi64
游.程 Thanks for pointing the problem with the slashes out! I had exactly the same problem!
接近 8 年之前 回复
csdnceshi67
bug^君 Strangely, when I set the JAVA_HOME from forward-slashes Java 6 JDK, it finally found my Java 7 JDK... :)
接近 8 年之前 回复
weixin_41568174
from.. all right my fault is appending a semicolon to JAVA_HOME. remove it. win7 x86_64.
接近 8 年之前 回复
weixin_41568110
七度&光 This one worked for me on Win8 x64. Thanks very much!
接近 8 年之前 回复
csdnceshi69
YaoRaoLov Another tip: I've gotten into the habit of ending with ';', in case I want to add another address later - don't do that here.
大约 8 年之前 回复
csdnceshi80
胖鸭 Remembering to restart the installer after adding the ENV Variable.
大约 8 年之前 回复
csdnceshi57
perhaps? 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!
大约 8 年之前 回复
csdnceshi70
笑故挽风 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.
8 年多之前 回复
csdnceshi79
python小菜 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? :-)
8 年多之前 回复

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

weixin_41568110
七度&光 Didn't work for me. So, I closed and reopened the setup. Then it worked.
4 年多之前 回复
csdnceshi68
local-host I had the same problem but my JAVA_HOME was pointing to C:\Program Files\Java\jdk1.7.0_79\bin; I changed it to C:\Program Files\Java\jdk1.7.0_79 and now it works - Running W7 - X64
大约 5 年之前 回复
csdnceshi79
python小菜 worked for me on Windows 8
5 年多之前 回复
csdnceshi61
derek5. For windows 7 x86. If you installed the java jdk while the android studio is open, try closing the android studio installer and try again. It immediately detected the jdk so seems to be fine with me.
5 年多之前 回复
weixin_41568174
from.. Win 8.1 64 didn't work
5 年多之前 回复
weixin_41568184
叼花硬汉 This just worked for me on Win 7 x64. Had to enter a VALID path, hit Next, get the error, go back, go Next again, leave the path completely blank, then Next again. Works for me.
5 年多之前 回复
csdnceshi75
衫裤跑路 It is not a valid solution anymore, gotta find out something new :/
5 年多之前 回复
csdnceshi63
elliott.david does not work for me, even installed java fresh - but of course not to C drive which is prob why the POS doesnt get found.
接近 6 年之前 回复
csdnceshi70
笑故挽风 after setting JAVA_HOME, end install program and try rerun several times, it works!
6 年多之前 回复
csdnceshi80
胖鸭 After I installed JDK6 and set JAVA_HOME to C:\Progra~1\Java\jdk1.6.0_45, then the installer picked up JDK7. Android SDK docs do say that JDK 6 is required - developer.android.com/sdk/index.html. This was on Win 7 Pro 64bit.
大约 7 年之前 回复
csdnceshi54
hurriedly% 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).
7 年多之前 回复
csdnceshi54
hurriedly% I don't know if Windows 8 is the relevant factor, but it certainly doesn't work on my Windows 8 machine.
7 年多之前 回复
csdnceshi77
狐狸.fox This does not work in Windows 8
接近 8 年之前 回复
csdnceshi78
程序go 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
接近 8 年之前 回复
csdnceshi52
妄徒之命 Sadly the fix isn't working on 7 x64 JDK 7 and last Android SDK
接近 8 年之前 回复
csdnceshi64
游.程 Not a working fix for Windows 7 x64, suggest an edit to the answer to make that clear.
大约 8 年之前 回复
weixin_41568196
撒拉嘿哟木头 take a look at my answer (just posted it). it worked for me, it might for you
8 年多之前 回复
csdnceshi74
7*4 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).
8 年多之前 回复
csdnceshi56
lrony* It looks like cache the test result, and even so after restar the computer you must start setup, forward till this step, press back, and press next again. For windows 7 x64, there is a registry fix: searching for Windows 7 x64 Registry Android, is possible to find it.
9 年多之前 回复
csdnceshi62
csdnceshi62 This trick works on Vista too... thanks!
9 年多之前 回复
csdnceshi67
bug^君 This is a pretty weird bug to say the least. It popped up on a workstation but not my desktop.
9 年多之前 回复
csdnceshi71
Memor.の Wah I re-downloaded JDK installer on my slow line only to realise that I DO HAVE JDK installed! And this worked thanks!
9 年多之前 回复
weixin_41568134
MAO-EYE Yep, works for me on windows 7 64 too
9 年多之前 回复
csdnceshi50
三生石@ Works for Windows XP as well. Thanks!
9 年多之前 回复
csdnceshi66
必承其重 | 欲带皇冠 It sounds silly, but this actually works.
9 年多之前 回复

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

csdnceshi63
elliott.david Thanks! Worked for me. Crazy - what gives with all this bugginess for installing these tools on Windows?
接近 5 年之前 回复
csdnceshi76
斗士狗 WOW! Worked perfect under Windows 7 x64 without 32-bit JDK! Thanks a lot :)
5 年多之前 回复
csdnceshi72
谁还没个明天 Amazing, this worked for me on Win 8.1 64 bit
接近 6 年之前 回复
csdnceshi53
Lotus@ Wow, it dod work. Who would have thought.
6 年多之前 回复
weixin_41568110
七度&光 Fantastic!!! Worked on windows 8 64-bit!!
6 年多之前 回复
csdnceshi62
csdnceshi62 This worked for me with 64 bit Vista as well.
大约 7 年之前 回复
csdnceshi71
Memor.の This worked in my 64 bit windows 7 with jdk7x64bit and the 20.0.3 installer
接近 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.

csdnceshi52
妄徒之命 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.
6 年多之前 回复
csdnceshi80
胖鸭 This worked for me as well.
大约 7 年之前 回复

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.

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

weixin_41568131
10.24 It's JAVA_HOME, not HOME_JAVA...
接近 3 年之前 回复

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.

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.

csdnceshi73
喵-见缝插针 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
接近 5 年之前 回复
csdnceshi78
程序go Nope. Just do the back-and-forward as explained above.
9 年多之前 回复

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.
csdnceshi72
谁还没个明天 Works perfect for Windows 7 64 bit. Thanks
5 年多之前 回复
csdnceshi64
游.程 Tried all of these and it still doesn't work
接近 7 年之前 回复

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.

共30条数据 1 3 尾页
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐