Sie sind auf Seite 1von 8

29/07/2013

environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow

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

Tell me more

SDK Manager.exe doesn't work - Android

I did: 1) Installed latest JDK 2) Installed latest Android SDK 3) Set environment JAVA_HOME and put %JAVA_HOME%\bin in path variable But when I clicked SDK Manager on Program Files or run it in cmd, nothing happened. (Actually a black cmd window appears and disappears a milliseconds. :| ) How to fix it? Edit: I Googled day by day but can't find a solution for this. Even I set path for ANDROID_SWT it also can't run. I suspect that Android SDK has bug in its installation package. Android installation - sdk manager.exe does not work Android installation/SDK Manager issues noone has solution for this. I'm totally exaushted and this is the last my try: Uninstall JDK, Android SDK, remove all ANDROID or JAVA environment variables, then reinstall JDK and Android SDK but nothing changes. Edit: Actually this is the second time I meet this problem. I got this problem only after I added more Environment variables for Ant and Maven. This is the summary: Install Windows XP SP3 --> Install JDK --> Install Android SDK --> Open SDK Manager and it works! --> append some more "bin" path of Ant and Maven in "path" variable --> Open SDK Manager and it doesn't open --> I rolled back by removing all environment variables --> SDK Manager still no opens! That's very strange! --> It is stranger when I reinstall JDK and Android SDK, it still no opens! :(
android environment-variables jdk

edited Jun 6 '11 at 4:52

asked Jun 4 '11 at 2:53 Emerald214 1,742 3 19 60

add comment (requires an account with 50 reputation)

20 Answers
Step #1: Open up a command prompt. Step #2: Use the c d command to move to wherever you installed your Android SDK. Step #3: Run t o o l s \ a n d r o i d. If that does not work, you should have information dumped to the command prompt that will help you stackoverflow.com/questions/6234403/sdk-manager-exe-doesnt-work-android

1/8

29/07/2013

environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow If that does not work, you should have information dumped to the command prompt that will help you diagnose your setup problem.
answered Jun 4 '11 at 11:17 CommonsWare 304k 17 513 581

It reports: "Unable to access jarfile lib\archquery.jar [INFO] Starting Android SDK and AVD Manager Invalid path ERROR: SWT folder '' does not exist. Please set ANDROID_SWT to point to the folder containing swt.jar for your platfo rm." Emerald214 Jun 5 '11 at 16:34 Hey ...I was facing the same problem .. this solution worked for me .. after running the Android command, it successfully opened SDK Manager and works fine.Thanks. Gunjan Shah Mar 26 at 5:37 Me too.. Thanks a lot for the tip.. still wondering why it didnt open when running as administrator Gaston Claret Jun 25 at 2:52

add comment (requires an account with 50 reputation)

I was getting the error "C:\Program is not recognized as an internal or external command" Followed by loads of "unable to copy file" Followed by something about Android_SWT not being able to be found. The way I fixed the problem on my system (Windows 8, 64 bit, JDK 7) was: 1. Create JAVA_HOME environment variable and point it to C:\Program Files\Java\jdk1.7.0_10\bin 2. 3. 4. 5. Open ANDROID SDK DIRECTORY\tools\android.bat in your favourite text editor Find the lines set java_exe= call lib\find_java.bat (it's split over 2 lines) Replace the lines with set java_exe="%JAVA_HOME%\java.exe" Save and run tools\android.bat

The problem was that the the space in the path was not being handled correctly. By wrapping the path in quotation marks, the space is then correctly catered for.
answered Jan 10 at 23:27 Steve 885 1 7 10 Worked like a charm! Thanks! :) Kounavi Feb 9 at 1:02 its working,steps are simple and clear.Thank u Ravikumar11 Jun 7 at 12:29 this one works! thanks Anggrian Jul 24 at 19:49 add comment (requires an account with 50 reputation)

After a lot of searching and trying different methods, I found the solution to the problem at my end: SDK Manager couldn't find my profile directory. After setting the environment variable ANDROID_SDK_HOME (I set mine to a newly created folder C:\Android), SDK manager started no prob.
answered Jul 18 '11 at 9:12 Lars Erik Jordet 61 1 add comment (requires an account with 50 reputation)

I have Wondows 7 64 bit (MacBook Pro), installed both Java JDK x86 and x64 with J A V A _ H O M E pointing at x32 during installation of Android SDK, later after installation J A V A _ H O M E pointing at x64. My problem was that Android SDK manager didn't launch, cmd window just flashes for a second and that's it. Like many others looked around and tried many suggestions with no juice! My solution was in adding bin the J A V A _ H O M E path: C:\Program Files\Java\jdk1.7.0_09\bin instead of what I entered for the start:

stackoverflow.com/questions/6234403/sdk-manager-exe-doesnt-work-android

2/8

29/07/2013

environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow


C:\Program Files\Java\jdk1.7.0_09 Hope this helps others.... good luck!
edited Nov 25 '12 at 15:03 Abdul Rahman 1,242 3 9 21 add comment (requires an account with 50 reputation) answered Nov 25 '12 at 14:42 Sharif 51 1 1

I had the same problem. when i run \tools\android.bat, i got the exception: Exception in thread "main" java.lang.NoClassDefFoundError: com/android/sdkmanager/Main My resolved method: 1. 2. 3. 4. edit \tools\android.bat find "%jar_path%;%swt_path%\swt.jar" modify to "%tools_dir%\%jar_path%;%tools_dir%\%swt_path%\swt.jar" save, and run SDK Manager.exe again

answered Sep 27 '11 at 10:02 zhjn 41 1 Doing this made something happen when run from the command line. It starts downloading a bunch of xml files and other files. When it's running the :MkTempCopy section it sets t o o l s _ d i r to the current directory. There appears to be a bug in this section. gawpertron Oct 25 '12 at 13:14 add comment (requires an account with 50 reputation)

My issue was the following error on windows 7: C : \ d e v \ A n d r o i d \ a n d r o i d s d k w i n d o w s \ t o o l s > a n d r o i d [ I N F O ]S t a r t i n gA n d r o i dS D Ka n dA V DM a n a g e r N oc o m m a n dl i n ep a r a m e t e r sp r o v i d e d ,l a u n c h i n gU I . S e e' a n d r o i dh e l p 'f o ro p e r a t i o n sf r o mt h ec o m m a n dl i n e . E x c e p t i o ni nt h r e a d" m a i n "j a v a . l a n g . U n s a t i s f i e d L i n k E r r o r :n os w t w i n 3 2 3 5 5 0o r s w t w i n 3 2i ns w t . l i b r a r y . p a t h ,j a v a . l i b r a r y . p a t ho rt h ej a rf i l e a to r g . e c l i p s e . s w t . i n t e r n a l . L i b r a r y . l o a d L i b r a r y ( U n k n o w nS o u r c e ) a to r g . e c l i p s e . s w t . i n t e r n a l . L i b r a r y . l o a d L i b r a r y ( U n k n o w nS o u r c e ) a to r g . e c l i p s e . s w t . i n t e r n a l . C . < c l i n i t > ( U n k n o w nS o u r c e ) a to r g . e c l i p s e . s w t . w i d g e t s . D i s p l a y . < c l i n i t > ( U n k n o w nS o u r c e ) a tc o m . a n d r o i d . s d k m a n a g e r . M a i n . s h o w M a i n W i n d o w ( M a i n . j a v a : 2 9 2 ) a tc o m . a n d r o i d . s d k m a n a g e r . M a i n . d o A c t i o n ( M a i n . j a v a : 2 7 6 ) a tc o m . a n d r o i d . s d k m a n a g e r . M a i n . r u n ( M a i n . j a v a : 9 9 ) a tc o m . a n d r o i d . s d k m a n a g e r . M a i n . m a i n ( M a i n . j a v a : 8 8 ) The solution was to disable McAfee 8.8. Apparently some recent update is now blocking my Android environment.
answered Oct 5 '11 at 0:41 darb 31 1

This is a workaround only. Disabling antivirus permanently to solve an install problem is bad practice. Was AV disabled just during install or turned off for good? Lizz Nov 10 '12 at 8:14

add comment (requires an account with 50 reputation)

I solved my problem opening android.bat inside sdk/tools and setting the java_exe property, which was empty. set java_exe="C:\Program Files\Java\jre6\bin\java"
answered Feb 28 at 13:31 Isa Barbarisi 21 1 add comment (requires an account with 50 reputation)

stackoverflow.com/questions/6234403/sdk-manager-exe-doesnt-work-android

3/8

29/07/2013

environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow

I add new environment variable "ANDROID_SDK_HOME" and set it, like my path to android SDK folder (c:/Android) and it's work!
answered Aug 18 '11 at 18:54 andrew 11 1 add comment (requires an account with 50 reputation)

The way I solved your last problem was by right clicking the android.bat file, and chose edit with notepad++. I then went down to the part of the program where it had this bit of code: cd /d %~dp0 It was also some other lines of code, but I deleted them. After deleting these other lines I simply just wrote(under the cd /d %~dp0): cd Program Files cd java cd jdk1.7.0_03 cd bin I dont know here you java.exe file is located but mine was at lest located there.
answered Apr 12 '12 at 17:09 Jacob R 23 5 add comment (requires an account with 50 reputation)

Similar to sixty9 I renamed java.exe, javaw.exe, javaws.exe (I never delete files when troubleshooting) after I created a JAVA_HOME environement variable and added path variables. I had installed the Java SDK on my D:\ drive ( instead of the default). 1. Create a JAVA_HOME variable: Variable Name: %JAVA_HOME% Value: D:\Program Files\Java. 2. Added the following to the Path variable: %JAVA_HOME%\jre7\bin;%JAVA_HOME%\jdk1.7.0_03\bin; 3. Renamed java.exe, javaw.exe and javaws.exe. 4. Restarted the system and the Android SDK installer found my JDK and installed successfully.
answered Apr 15 '12 at 13:57 BinaryAfterMath 11 1 add comment (requires an account with 50 reputation)

I solved this problem, which occured for me after manually installing the ADT (4.2/api 17) bundle on Windows 7 64 bit in C:\Program Files. The steps I had to take: 1. Set the J A V A _ H O M Eenvironment variable to the installation directory of the (64 bit) JDK, C : \ P r o g r a mF i l e s \ J a v a \ j d k 1 . 7 . 0 _ 1 1in my case. 2. Run SDK Manager as administrator at least once. SDK Manager allows you to change files in Program Files, so you should give it the proper access rights.
edited Jan 22 at 9:55 answered Jan 21 at 12:28 Eric 701 2 11

add comment (requires an account with 50 reputation)

And if t o o l s \ a n d r o i d works for you while .exe doesn't, it's probably the x64 java. It started working when i completely uninstalled JDK with JRE (shows as separate option in windows uninstal control panel applet) and android sdk and reinstalled using x86 version. stackoverflow.com/questions/6234403/sdk-manager-exe-doesnt-work-android

4/8

29/07/2013

environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow uninstal control panel applet) and android sdk and reinstalled using x86 version.
Why does it worth the time, you may ask? Well, such an inconsistency obvoiusly means that amount of testing with x64 java is zero and so you can probably experience many other failures in the future.
answered Jan 10 '12 at 21:41 Gman 353 2 11 add comment (requires an account with 50 reputation)

I had this same problem and after trying a variety of things like changing the path variables I went to java.com on a whim and downloaded java, installed, and lo and behold the sdk manager worked after that.
answered Apr 5 '12 at 21:21 Brian 45 7 add comment (requires an account with 50 reputation)

Finally got this torterous SDK to run. When installing 32bit Java on 64bit windows system, set ANDROID_SWT to e:\android-sdk\tools\lib\x86 not ..\x86_64 Dear Android SDK team, I genuinely hope some serious attention is being paid to these problems. SDK should be effortless to set up. This is how you lose customers to other platforms where this kind of thing is a one-click ordeal. I was going to buy another android device to test my game on, but after last 2 days trying to traverse the maze of your incompetence I think i'll just stick with iOS as my main development target.
answered Apr 6 '12 at 18:53 Private Void 49 7 add comment (requires an account with 50 reputation)

Had the same problem and tried everything I browse in several forums till I found a clue, then finally solved the problem. Basically I installed the SDK and worked ok, then my Windows Vista crashed, on restart I run SDK again but it only opened a CMD window which closed immediately. So here's a list of useless things I did: Went to CMD "d:/java/android/tool" and execute "android.bat", didn't work and show an pointer exception error. Reinstalled the whole thing JDK + SDK Changed the system path to a new folder I traced and deleted all android occurrences on Regedit At this point I was seriously considering start learning objetive-c was not a bad idea, finally I did this: delete ".android" folder from "c:/users/youruser/" delete all files within "c:/users/youruser/AppData/Local/Temp" reinstall SDK it WORKED !! I'm not sure though if is necessary to uninstall SDK (since I had again to download all packages & platforms) and just clear the temp folder. Hope this helps.
edited Jul 28 '12 at 0:16 Software Monkey 23.2k 6 64 105 answered Jun 25 '11 at 4:10 mmb000 1

I swear I did everything you said. Remove .android folder, files in Temp, all android environment vars; using CCleaner to clean everything; restart Windows; reinstall SDK. It still doesn't work. Emerald214 Jun 25 '11 at 9:02 add comment (requires an account with 50 reputation)

stackoverflow.com/questions/6234403/sdk-manager-exe-doesnt-work-android

5/8

29/07/2013

add comment (requires an account with 50 reputation)

environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow

I fixed this issue by reinstalling it in Program Files, it originally tried to install it in c : / U s e r s / . . . / A p p D a t a / A n d r o i d / . . .. Mine was caused by a user permission issue that running as admin didn't seem to fix (perhaps because they call batch files?).
answered Oct 16 '12 at 11:44 Daniel Imms 11.5k 3 10 42 add comment (requires an account with 50 reputation)

I had the same problem, running X 6 4J a v a( 1 . 7 . 0 _ 0 3 b 0 5 ). Even though I had both C : \ P r o g r a m F i l e s \ J a v a \ j r e 7 \ b i n and C : \ P r o g r a mF i l e s \ J a v a \ j d k 1 . 7 . 0 _ 0 3 \ b i n listed in my path, it wouldn't start - just flashed a command prompt. The t o o l s \ l i b \ f i n d _ j a v a . b a t file was reporting that it was attempting to run C : \ W i n d o w s \ s y s t e m 3 2 \ j a v a . e x e but failed. Huh? I checked, and found outdated copies of j a v a . e x e, j a v a w . e x e and j a v a w s . e x e in my C : \ W i n d o w s \ s y s t e m 3 2. How did those get there, I didn't put them there! I deleted those three files from C : \ W i n d o w s \ s y s t e m 3 2 and the problem was fixed. Thinking about it, the problem likely would have been fixed by making sure that C : \ P r o g r a m F i l e s \ J a v a \ j r e 7 \ b i n and C : \ P r o g r a mF i l e s \ J a v a \ j d k 1 . 7 . 0 _ 0 3 \ b i n were at the START of my PATH variable instead of tacked onto the end.
edited Oct 28 '12 at 6:56 Luksprog 34.1k 8 29 50 add comment (requires an account with 50 reputation) answered Mar 28 '12 at 19:14 sixty9 1

I ran into this problem: I'd get the error

C : \ p r o j e c t s \ A n d r o i d \ a n d r o i d s d k w i n d o w s 1 . 5 _ r 1 \ t o o l s \ l i b > d d m s 0 2 : 0 3 : 0 7E / d d m s :s h u t t i n gd o w nd u et ou n c a u g h te x c e p t i o n 0 2 : 0 3 : 0 7E / d d m s :n os w t w i n 3 2 3 5 5 0o rs w t w i n 3 2i ns w t . l i b r a r y . p a t h ,j a v a . l i b r a r y . p a t ho rt h ej a rf i l e j a v a . l a n g . U n s a t i s f i e d L i n k E r r o r :n os w t w i n 3 2 3 5 5 0o rs w t w i n 3 2i ns w t . l i b r a r y . p a t h ,j a v a . l i b r a r y . p a t ho rt h ej a rf i l e a to r g . e c l i p s e . s w t . i n t e r n a l . L i b r a r y . l o a d L i b r a r y ( U n k n o w nS o u r c e ) a to r g . e c l i p s e . s w t . i n t e r n a l . L i b r a r y . l o a d L i b r a r y ( U n k n o w nS o u r c e ) a to r g . e c l i p s e . s w t . i n t e r n a l . C . < c l i n i t > ( U n k n o w nS o u r c e ) a to r g . e c l i p s e . s w t . g r a p h i c s . F o n t D a t a . < i n i t > ( U n k n o w nS o u r c e ) a tc o m . a n d r o i d . d d m s . P r e f s D i a l o g . s e t D e f a u l t s ( P r e f s D i a l o g . j a v a : 2 2 1 ) a tc o m . a n d r o i d . d d m s . P r e f s D i a l o g . i n i t ( P r e f s D i a l o g . j a v a : 1 5 0 ) a tc o m . a n d r o i d . d d m s . M a i n . m a i n ( M a i n . j a v a : 7 4 ) I got this solved by copying the swt file from eclipse into the t o o l s directory. If you search in the directory you have Eclipse installed there is an SWT dll, named something like s w t w i n 3 2 < 4 d i g i t s > . d l l (mine was named s w t w i n 3 2 3 7 4 0 . d l l): I copied that into the tools directory, and everything worked after that.
answered Dec 4 '12 at 19:08 Femi 35.7k 3 34 53 add comment (requires an account with 50 reputation)

stackoverflow.com/questions/6234403/sdk-manager-exe-doesnt-work-android

6/8

29/07/2013
What I did was:

environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow

set a new environment variable in the top user section. VARIABLE NAME: JAVA_HOME VARIABLE VALUE: set it to the installation directory of your most recent JDK. For me it was, C:\Program Files\Java\jdk1.7.0_13 . Run SDK Manager as administrator at least once. I use windows 7. This method worked for me after a lot of research. What I dont understand is when using 'where java' in the command prompt it still references C:\Windows\System32\java.exe. My SDK Manager now opens when I need it so I solved my problem.
answered Feb 18 at 21:57 CagedN 1 2 add comment (requires an account with 50 reputation)

I was experiencing the UnsatisfiedLinkError on Windows 7 64-bit after installing adt-bundle-windowsx86_64-20130717.zip: E x c e p t i o ni nt h r e a d" m a i n "j a v a . l a n g . U n s a t i s f i e d L i n k E r r o r :n os w t w i n 3 2 3 5 5 0o rs w t w i n 3 2i ns w t . l i b r a r y . p a t h ,j a v a The root cause was that McAfee has a feature that blocks loading DLL's from the temporary directory. This is a problem because android.bat copies a bunch of JAR and DLL files to a temporary directory and runs the program from there, to make it easy to upgrade the app in-place. This feature can be disabled, however. You can either disable "Access Protection" altogether or only disable the feature that blocks loading DLLs from temporary folders.

stackoverflow.com/questions/6234403/sdk-manager-exe-doesnt-work-android

7/8

29/07/2013

environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow

answered Jul 21 at 14:11 denversc 38 5 add comment (requires an account with 50 reputation)

protected by Community Mar 15 at 13:42


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
environment-variables jdk or ask your own question.

android

This ad is supporting your extension Smooth GesturesTurn off these ads?

stackoverflow.com/questions/6234403/sdk-manager-exe-doesnt-work-android

8/8

Das könnte Ihnen auch gefallen