1

This problem was asked many times, but none of solutions doesnt help me.

I am using Windows 7 SP1 (x64), JDK 1.7.0_03 (x86), JRE 7 (x86) and Android SDK Tools r16.

When I install Android SDK Tools it says -

Java SE Development Kit (JDK) version 1.7 has been found

But after install SDK Manager closes instantly. android.bat and find_java.bat say -

WARNING: Java not found in your path.

I have tried set enviroment variables JAVA_HOME, PATH manually but this doesnt help. Searching solution many hours, setting variables, reinstalling java / sdk - nothing helps.

Thanks in advance.

Demion
  • 857
  • 1
  • 14
  • 27

7 Answers7

3

Install the x86 version, not the 64 bit version.

Vincent Scheib
  • 17,142
  • 9
  • 61
  • 77
  • And it really ticks me off that the Android SDK installer doesn't specify...I went through JDK 7 and 6 in x64 versions before finally succeeding with JDK 6 x86. What a waste of my time! – acjay Aug 14 '12 at 18:42
1

I just set a Environment Variable named JAVA_HOME with the value: C:\Program Files\Java\jdk1.7.0_05\ The problem is solved and sdk works properly.

MJ_
  • 11
  • 1
1

Well, I was facing the same problem, I found that the error might be a resolved by doing the following.

  1. Download Android SDK, try to install, you get a java error (if you don't have it)
  2. Typically you go download java, install and hit retry - but fail.
  3. Adding JAVA_HOME didn't help, so I rebooted the pc and tried again.
  4. Success, I don't know if it's the reboot after installing JAVA, or reboot after adding JAVA_HOME that solved the problem. One of them did the trick.

My recommendation is : 1. Install JAVA (in my case 1.7 x64), reboot. 2. Install android sdk, if it fails, add JAVA_HOME as explained above somewhere, reboot. 3. Install the sdk.

eitama
  • 1,477
  • 14
  • 16
1

I know that this may be outdated, but someone would probably find it useful. I had this problem myself, easiest(maybe dirty) solution I came up with is to change the default location when installing android studio.

Something like this :

C:\Program files\Java\jdk-xxx\

to =>

C:\Program files(x86)\Java\jkd-xxx\

Installer is searching in x86 Program files folder probably for a 32bit version, but its working perfectly for me this way :)

Dvenee
  • 39
  • 7
1

Android requires Java 1.5 or 1.6.

I haven't tested this, but I have seen posts about Android working with 1.7 as long as you also have 1.6 installed. Although this requires having two versions of java installed, and I am not sure it's worth it.

edthethird
  • 6,263
  • 2
  • 24
  • 34
1

maybe you are using JRE, not JDK. You can check which java you are using with: where java

Mavlarn
  • 3,807
  • 2
  • 37
  • 57
  • in command line in windows, in Start menu - run, enter "cmd" and press enter, then you can get into the windows command line. – Mavlarn Mar 05 '12 at 05:47
0

If you believe you have JDK installed and it was not properly recognized, set SDK Location on Eclipse (Windows > Preference). You can open/Update SDK Manager thru Eclipse.

Work fine in my Windows 7 SP1 (x64), JDK 1.7.0_03 (x64), JRE 7 (x64) and Android SDK Tools r17.

Hariadi
  • 606
  • 10
  • 17