21

Can anyone please confirm if android development is not yet supported on windows 7 x64? I downloaded the sdk, but when I tried to launch the sdk and avd manager it fails to launch.

vj01
  • 653
  • 1
  • 7
  • 16
  • It's supported. I'm using now on several machines. When it fails to launch, what do you mean? Nothing happens, throws an error...what? – Chris Thompson Apr 22 '10 at 21:45
  • When start - fails with: [2013-03-20 10:47:42 - SDK Manager] [SDK Manager] 'D:\Android' is not recognized as an internal or external command, [2013-03-20 10:47:42 - SDK Manager] [SDK Manager] operable program or batch file. Actualy I have d:\Adnroid sdks\... folder – Kostadin Mar 20 '13 at 08:47
  • Problem is not with folders and configuration - I'm trying to start sdk manager directly as program. It worked in WinXp and Win 7, but now open fo second black console and closes without message – Kostadin Mar 20 '13 at 08:48

9 Answers9

33

What worked for me was adding the JAVA_HOME environment variable pointing to the jdk folder (in my case c:\Program Files\Java\jdk1.7.0_04) and adding %JAVA_HOME%\bin to PATH variable

Yahya Uddin
  • 26,997
  • 35
  • 140
  • 231
durzy
  • 555
  • 4
  • 8
9

This question is probably dead but I think I've figured it out.

Ensure you've added the c:\android_sdk_windows\tools dir to your %PATH% environmental variable.

In eclipse check Windows->Preferences->Android and ensure you've set the SDK location to the SDK directory above.

Manually create 2 directories under the SDK directory

platforms

add-ons

The SDK and AVD manager should now be launchable.

Neil Aitken
  • 7,856
  • 3
  • 41
  • 40
  • 3
    Tried all previous solutions that were offered but only this one solved my problem. Adding the add-ons folder did the magic. – Lior Ohana Feb 16 '13 at 13:21
  • Thanks. Current version of Android SDK installs under C:\Users\\AppData\Local\Android\Sdk – pmont Oct 17 '18 at 03:06
4

For me the problem was solved on windows 8 64 by editing the find_java.bat in the android_sdk/tools/lib folder.

Basically the for loops that set java_exe and javaw_exe will not work correctly if the path has a white space in it! Ie. "C:\Program Files\Java\jdk" has this, find_java.bat will set java_exe to "C:\Program" which android.bat doesn't like.

I was ok when i edited find_java.bat like this: (see the two lines after 'rem edit:)

rem Check we have a valid Java.exe in the path. The return code will
rem be 0 if the command worked or 1 if the exec failed (program not found).
for /f %%a in ('%~dps0\find_java.exe -s') do set java_exe=%%a
rem edit:
set java_exe="%JAVA_HOME%\bin\java.exe"
if not defined java_exe goto :CheckFailed

:SearchJavaW
rem Check if we can find a javaw.exe at the same location than java.exe.
rem If that doesn't work, just fall back on the java.exe we just found.
for /f %%a in ('%~dps0\find_java.exe -s -w') do set javaw_exe=%%a
rem edit:
set javaw_exe="%JAVA_HOME%\bin\javaw.exe"
if not exist %javaw_exe% set javaw_exe=%java_exe%
goto :EOF

HTH

RookieGuy
  • 517
  • 7
  • 18
3

I got the same problem...but I did not find any solution on the problem...so finaly I set down and start to debug android.bat file. You find it installed androidSDK folder and inside the tools folder.

What I found was interesting... Missing two important variables setting! First: find the next row: java_exe= Here missing java.exe location. You can use global variable if you set example: JAVA_HOME. If set it you can override the row like: java_exe=%JAVA_HOME%

Second: Find the next row: for /f %%a in ('%java_exe% -jar lib\archquery.jar') do set swt_path=lib\%%a Here missing varibale before lib...settings.

A few lines above you can find a variable setting row like: set work_dir="%cd%" So...you can use this variable to help to find lib\archquery.jar file

Solution: for /f %%a in ('%java_exe% -jar %work_dir%\lib\archquery.jar') do set swt_path=lib\%%a

If you finished...just save the modified bat file and try to start Abdroid SDK manager from command promt, exe file or Eclipse...

SORRY GUYS!!! I don't understand yet... So! I did my modification in android.bat. Install Eclipse Juno Java and Android SDK. I set a workspace directory in eclipse, try to run Android SDK manager...and it is not run. It refered the set workspace not the installed AndroidSDK folder...

So possible the best soulution if you use exact path to ...\lib\archquery.jar file.

aBanhidy
  • 257
  • 1
  • 3
  • 11
2

Hey guys finally got a answer to your problem for the ANDROID AVD. My name is Jeremy; I'm not a user of Stack Overflow. Anyway.

*WINDOWS ONLY**

FIRST STEP: Delete everything you downloaded from Android. When i say everything I mean everything, from folders and anything else. Sometimes the uninstall does not do that, so you may have to manually do it. Reboot once you finish.

SECOND STEP: Re-install everything. I recommend that you use the installer_r21-windows.exe (Recommended) on the website.

THIRD STEP: Install all of your packages that you are going to use while developing.

FOURTH STEP: Set up your AVD and click OK. It will take a while, and it will say "Application not responding" at the top of the window. Do not do anything to it; let it keep going and it will eventually start up.

Hope that get it for you it did for me without the hassle. P.S. I did it on Windows 7.

edwga
  • 190
  • 1
  • 8
  • 1
    If deleting everything and re-installing is the 'solution' then the problem was not understood correctly. Sometimes that is ok, but I do not think it is for a developer with his devtools. – Sqeaky Jul 25 '13 at 19:53
2

As one of the comments indicated its C:\android-sdk-windows\tools\lib\find_java.exe and find_java.bat to blame. I have Win7-64bit, no 32bit JavaJRE/JDK installs, one jre7 64bit install. Find_java.bat+exe tool cannot find proper path to 64bit version. I guess you're fine if only 32bit JRE was installed (did not try this).

  • Open DOS console and goto folder C:\android-sdk-windows\tools\lib\
  • run find_java.bat and find_java.exe, you should get "failed to convert path..." and "c:\windows\system32\java.exe" printouts
  • type command set path=c:\Program Files\Java\jre7\bin;%path%
  • run find_java.bat and find_java.exe, you don't get any errors and proper path to c:/program files/java/jre7/bin/java.exe is printed

If you don't want to mess with Control Panel's environment prefs you could create two batch scripts to run AVD and SDK Manager.

C:\android-sdk-windows\AVD Manager.bat

set PATH=C:\Program Files\Java\jre7\bin;%PATH%
"AVD Manager.exe"

C:\android-sdk-windows\SDK Manager.bat

set PATH=C:\Program Files\Java\jre7\bin;%PATH%
"SDK Manager.exe"

This problem and fix was tested on Win7-64bit/Android SDK Tools 20.0.3/Android SDK Platform-tools 14 releases.

Whome
  • 10,181
  • 6
  • 53
  • 65
2

I think you have your android-sdk folder in one of windows 7 system folders, e.g. Program Files (x86). Permissions there are tightly controlled by the system. You better create the android-sdk folder outside of those system directories.

sth
  • 222,467
  • 53
  • 283
  • 367
yeysus
  • 21
  • 1
2

I am having this same issue. I have my SDK in C:\Android\android_sdk_windows. It already has the platform and add-ons folders. From the UI, I can enter the infor for the AVD, but when I click [Create AVD], it just hangs. I can see that it created a new folder of .avd under .ini file. And in the .avd folder are an sdcard.img and userdata.img file.

When I finally go to close the AVD program (from Windows), it comes back with a dialog telling me that the "Java SE platform binary is not responding."

One possible issue was that I had both Java 6 (32-bit) and Java 7 (64-bit) and the find_java.bat program called by android.bat was finding the 64-bit. It still seemed to be working to bring up the UI but it was very slow so I uninstalled the Java 7. Now the UI comes up very quickly (relatively speaking).

However, I've traced the real culprit to the mksdcard.exe program. If I create an AVD with an empty SD value, it creates it fine. If I give it an SD value -- HANG.

Rod
  • 21
  • 2
1

If you have moved your Users directory to a drive that is not called c:\ it will not work - a workaround is to copy the .android folder from E:\Users\Username\.android to E:\Users\Username\.android - then it should work.

Also make sure your environmental variable Path is set to the location of the tools folder - e.g. E:\android-sdk_r05-windows\android-sdk-windows\tools

sth
  • 222,467
  • 53
  • 283
  • 367
Matt
  • 11
  • 1
  • might be because Java runtime has wrong user.home property - see my response on http://stackoverflow.com/questions/4810478/android-sdk-and-avd-manager-cant-create-avd-in-correct-file-location – Toybuilder Mar 14 '11 at 01:39