Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android SDK not installing on win 7 64-bit

Tags:

java

android

I am trying to install Android SDK on windows 7 64-bit but it doesn't work. I keep getting this screen:

JAVA SE Development Kit (JDK) not found.  
Error: Failed to find Java version for 'C:\Windows\system32\java.exe': [2] The system cannot find the file specified.  (...)   
If you believe you have a JDK installed and it was not properly recognized, simply set an environment variable JAVA_HOME to point to it.

I tried setting JAVA_HOME to C:\Windows\System32\java.exe (which is my install path) and it still doesn't work.

In the command line i tested the version with java -version and it works perfectly.

Tried the old trick of back and next but sadly doesn't work.

this is so disappointing.... any suggestions?

like image 353
Moshe Shaham Avatar asked Apr 10 '12 22:04

Moshe Shaham


People also ask

Can Android Studio work on Windows 7?

No, you cannot install the latest Android Studio(4.1. 3) on the windows 7(32 bit) system. To install the latest version of Android Studio you need Windows 7(64 bit) system.

How install Android SDK build tools manually?

You will need to download the Android SDK without Android Studio bundled. Go to Android SDK and navigate to the SDK Tools Only section. Copy the URL for the download that's appropriate for your build machine OS. Unzip and place the contents within your home directory.


5 Answers

It's JDK, not Java, it's missing. JAVA_HOME shouldn't point to the java.exe file. It should point to the jdk-folder. Typically C:\Program Files\Java\jdk1.6.0_23 or similar. If you haven't got a jdk-folder somewhere, you should install JDK from here.

Note that the official requirement for developing for Android is JDK 6.

like image 163
Matsemann Avatar answered Sep 28 '22 06:09

Matsemann


Setting the JAVA_HOME environment variable in System variable to C:\Program Files\Java\jdk1.7.0_07\ did solve my problem.

A couple of points to note:

  1. No need to specify bin or jre folder name.
  2. You will need to cancel and restart the android sdk installation. Previous/Next may not work.
  3. I just copied the folder name from Windows explorer address bar. No need to replace the \ with /.
like image 42
daniele Avatar answered Sep 28 '22 04:09

daniele


Download JDK 64bit from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Add the system variable JAVA_HOME pointing to C:\Program Files\Java\jdk1.7.0_21

like image 45
ilevende Avatar answered Sep 28 '22 06:09

ilevende


Here are the setup steps that worked for me starting from scratch (as of today - 6/26/2013)

[Setup Steps]

Part I - Java JDK

  1. Remove all Java programs installed on PC.
  2. Go to: http://www.oracle.com/technetwork/java/javase/downloads/index.html (This is Java JDK download site)
  3. [http://www.oracle.com/technetwork/java/javase/downloads/index.html]->Mouseclick
  4. Select the radio button, , and select and download and save it into any temporary directory.
  5. Mouse click to highlight, jdk-7u25-windows-x64.exe, then right-click-mouse and select to start installation process and install as default settings.

Result: Java JDK installation will be completed as expected

Part II - Android SDK (Preliminary Setup)

  1. [PC:Home]->mouse-click
  2. [PC:Start Menu]->mouse-click
  3. [PC:Control Panel]->mouse-click
  4. [PC:System]->mouse-click
  5. [PC:Advanced system settings]->mouse-click
  6. [PC:Environment Variables:System variables]->mouse-click
  7. [PC:New System Variable]->Fill in as follows:
    • Variable name : JAVA_HOME
    • Variable value: C:\Program Files\Java\jdk1.7.0_25 ->mouse-click
  8. Shut down / Restart PC

This is to make sure the change in environment variable will work

Part III - Android SDK

  1. Go to: http://developer.android.com/sdk/index.html
  2. [http://developer.android.com/sdk/index.html]->mouse-click
  3. Download the following and save it into any temporary directory on your PC:
    • installer_r22.0.1-windows.exe (recommended)
  4. Mouse-click the downloaded , then right-click-mouse and select to start installation process and install as default settings.

Result: Android SDK installation will be completed as expected

like image 42
Tommy Avatar answered Sep 28 '22 06:09

Tommy


A change in one of the batch files since release 16 of the Android Tools SDK is probably the culprit. Try the ZIP file instead of the EXE. Download android-sdk_r18-windows.zip from http://developer.android.com/sdk/index.html. Unzip to a new Android directory where your program files normally reside (other locations should also work). Replace find_java.bat in the Android\android-sdk\tools\lib directory with the one from the release 16 SDK tools (if you haven't got it get it from https://tekeye.uk/downloads/find_java.zip). Using the ZIP instead of the EXE means the shortcuts and program groups won't be set up but you can run SDK Manager.exe in the android-sdk folder to grab the rest of the SDK.

like image 21
Daniel S. Fowler Avatar answered Sep 28 '22 04:09

Daniel S. Fowler