Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run "android.bat sdk" in Windows 7

I have downloaded and installed Android SDK and tried to start android.bat sdk but got following exception:

C:\products\Android\tools>android.bat sdk
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.<clinit>(Unknown Source)
        at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
        at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:328)
        at com.android.sdkmanager.Main.doAction(Main.java:302)
        at com.android.sdkmanager.Main.run(Main.java:118)
        at com.android.sdkmanager.Main.main(Main.java:101)

I have searched for solution a long time but I cannot get it to work. Is there anything I have to set up first?

like image 202
user1730495 Avatar asked Oct 09 '12 03:10

user1730495


2 Answers

Just in case this is still bothering anyone: I had this same problem. What I ended up doing was:

  1. Searching for the swt.jar file (in your Android SDK directory, look at tools\lib\x86 or tools\lib\x86_64).
  2. Unpack it using jar:

    mkdir tmp

    cd tmp

    jar xf <path>\tools\lib\x86\swt.jar

  3. Copy the dlls to the tools folder.

    copy tmp\*.dll <path>\tools

After that I was able to run the SDK manager.

like image 150
Femi Avatar answered Nov 02 '22 14:11

Femi


This works for me: Add the following in your android.bat file:

 -Dswt.library.path = {swt.jar folder path} 

before this phrase:

com.android.manager.Main

Run android.bat

like image 22
Mehdi golnari Avatar answered Nov 02 '22 14:11

Mehdi golnari