Environment Variables - SDK Manager

download Environment Variables - SDK Manager

of 8

Transcript of Environment Variables - SDK Manager

  • 29/07/2013 environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow

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

    Tell me more

    Emerald214

    1,742 3 19 60

    20 Answers

    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

    add comment (requires an account with 50 reputation)

    Step #1: Open up a command prompt.

    Step #2: Use the cd command to move to wherever you installed your Android SDK.

    Step #3: Run tools\android.

    If that does not work, you should have information dumped to the command prompt that will help you

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

    SDK Manager.exe doesn't work - Android

  • 29/07/2013 environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow

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

    CommonsWare

    304k 17 513 581

    Steve

    885 1 7 10

    Lars Erik Jordet

    61 1

    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

    1 It reports: "Unable to access jarfile lib\archquery.jar [INFO] Starting Android SDK and AVD Manager Invalidpath 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. Open ANDROID SDK DIRECTORY\tools\android.bat in your favourite text editor

    3. Find the lines set java_exe= call lib\find_java.bat (it's split over 2 lines)

    4. Replace the lines with set java_exe="%JAVA_HOME%\java.exe"

    5. 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

    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

    add comment (requires an account with 50 reputation)

    I have Wondows 7 64 bit (MacBook Pro), installed both Java JDK x86 and x64 with JAVA_HOME pointing

    at x32 during installation of Android SDK, later after installation JAVA_HOME 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 JAVA_HOME path:

    C:\Program Files\Java\jdk1.7.0_09\bin

    instead of what I entered for the start:

  • 29/07/2013 environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow

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

    Abdul Rahman

    1,242 3 9 21

    Sharif

    51 1 1

    zhjn

    41 1

    darb

    31 1

    Isa Barbarisi

    21 1

    C:\Program Files\Java\jdk1.7.0_09

    Hope this helps others.... good luck!

    edited Nov 25 '12 at 15:03 answered Nov 25 '12 at 14:42

    add comment (requires an account with 50 reputation)

    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. edit \tools\android.bat

    2. find "%jar_path%;%swt_path%\swt.jar"

    3. modify to "%tools_dir%\%jar_path%;%tools_dir%\%swt_path%\swt.jar"

    4. save, and run SDK Manager.exe again

    answered Sep 27 '11 at 10:02

    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 tools_dir 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:\dev\Android\android-sdk-windows\tools>android

    [INFO] Starting Android SDK and AVD Manager

    No command line parameters provided, launching UI.

    See 'android --help' for operations from the command line.

    Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3550 or

    swt-win32 in swt.library.path, java.library.path or the jar file

    at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)

    at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)

    at org.eclipse.swt.internal.C.(Unknown Source)

    at org.eclipse.swt.widgets.Display.(Unknown Source)

    at com.android.sdkmanager.Main.showMainWindow(Main.java:292)

    at com.android.sdkmanager.Main.doAction(Main.java:276)

    at com.android.sdkmanager.Main.run(Main.java:99)

    at com.android.sdkmanager.Main.main(Main.java:88)

    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

    1 This is a workaround only. Disabling antivirus permanently to solve an install problem is bad practice. WasAV 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

    add comment (requires an account with 50 reputation)

  • 29/07/2013 environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow

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

    andrew

    11 1

    Jacob R

    23 5

    BinaryAfterMath

    11 1

    Eric

    701 2 11

    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

    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

    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

    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 JAVA_HOME environment variable to the installation directory of the (64 bit) JDK,

    C:\Program Files\Java\jdk1.7.0_11 in 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

    add comment (requires an account with 50 reputation)

    And if tools\android 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.

  • 29/07/2013 environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow

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

    Gman

    353 2 11

    Brian

    45 7

    Private Void

    49 7

    Software Monkey

    23.2k 6 64 105

    mmb000

    1

    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

    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

    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

    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 answered Jun 25 '11 at 4:10

    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)

  • 29/07/2013 environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow

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

    Daniel Imms

    11.5k 3 10 42

    Luksprog

    34.1k 8 29 50

    sixty9

    1

    Femi

    35.7k 3 34 53

    add comment (requires an account with 50 reputation)

    I fixed this issue by reinstalling it in Program Files, it originally tried to install it in

    c:/Users/.../AppData/Android/....

    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

    add comment (requires an account with 50 reputation)

    I had the same problem, running X64 Java (1.7.0_03-b05). Even though I had both C:\Program

    Files\Java\jre7\bin and C:\Program Files\Java\jdk1.7.0_03\bin listed in my path, it

    wouldn't start - just flashed a command prompt.

    The tools\lib\find_java.bat file was reporting that it was attempting to run

    C:\Windows\system32\java.exe but failed. Huh? I checked, and found outdated copies of

    java.exe, javaw.exe and javaws.exe in my C:\Windows\system32. How did those get there, I

    didn't put them there!

    I deleted those three files from C:\Windows\system32 and the problem was fixed.

    Thinking about it, the problem likely would have been fixed by making sure that C:\Program

    Files\Java\jre7\bin and C:\Program Files\Java\jdk1.7.0_03\bin were at the START of my

    PATH variable instead of tacked onto the end.

    edited Oct 28 '12 at 6:56 answered Mar 28 '12 at 19:14

    add comment (requires an account with 50 reputation)

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

    C:\projects\Android\android-sdk-windows-1.5_r1\tools\lib>ddms

    02:03:07 E/ddms: shutting down due to uncaught exception

    02:03:07 E/ddms: no swt-win32-3550 or swt-win32 in swt.library.path, java.library.path or the jar file

    java.lang.UnsatisfiedLinkError: no swt-win32-3550 or swt-win32 in swt.library.path, java.library.path or the j

    ar file

    at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)

    at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)

    at org.eclipse.swt.internal.C.(Unknown Source)

    at org.eclipse.swt.graphics.FontData.(Unknown Source)

    at com.android.ddms.PrefsDialog.setDefaults(PrefsDialog.java:221)

    at com.android.ddms.PrefsDialog.init(PrefsDialog.java:150)

    at com.android.ddms.Main.main(Main.java:74)

    I got this solved by copying the swt file from eclipse into the tools directory. If you search in the

    directory you have Eclipse installed there is an SWT dll, named something like swt-win32-.dll (mine was named swt-win32-3740.dll): I copied that into the tools directory, and

    everything worked after that.

    answered Dec 4 '12 at 19:08

    add comment (requires an account with 50 reputation)

  • 29/07/2013 environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow

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

    CagedN

    1 2

    What I did was:

    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

    add comment (requires an account with 50 reputation)

    I was experiencing the UnsatisfiedLinkError on Windows 7 64-bit after installing adt-bundle-windows-

    x86_64-20130717.zip:

    Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3550 or swt-win32 in swt.library.path, java

    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.

  • 29/07/2013 environment variables - SDK Manager.exe doesn't work - Android - Stack Overflow

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

    denversc

    38 5

    answered Jul 21 at 14:11

    add comment (requires an account with 50 reputation)

    protected by Community Mar 15 at 13:42This 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 android

    environment-variables jdk or ask your own question.

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