# Android SDK update tool



## Bateleur (Feb 19, 2010)

Hi,

This time I'm trying to run the Android SDK update tool (it is a java application). The application exits with this exception:


```
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-gtk-3550 or swt-gtk 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.internal.Converter.wcsToMbcs(Unknown Source)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
	at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
	at com.android.sdkuilib.internal.repository.UpdaterWindowImpl.open(UpdaterWindowImpl.java:93)
	at com.android.sdkuilib.repository.UpdaterWindow.open(UpdaterWindow.java:110)
	at com.android.sdkmanager.Main.showMainWindow(Main.java:281)
	at com.android.sdkmanager.Main.doAction(Main.java:247)
	at com.android.sdkmanager.Main.run(Main.java:92)
	at com.android.sdkmanager.Main.main(Main.java:81)
>
```

I have set JAVA_HOME to /usr/local/jdk1.6.0 and linux-f10-gtk2 is installed.

I'm wondering if anyone has had success running the Android update tool. What should I install/configure to get this running?

Thanks!


----------



## OH (Feb 19, 2010)

[cmd=]usr/ports]# make search name=swt[/cmd]

```
(...)
Port:   swt-3.5.1
Path:   /usr/ports/x11-toolkits/swt
Info:   Standard Widget Toolkit for Java
(...)
Port:   swt-devel-3.6.m5,1
Path:   /usr/ports/x11-toolkits/swt-devel
Info:   Standard Widget Toolkit for Java
```

Did you try installing one of those?


----------



## DutchDaemon (Feb 19, 2010)

@Bateleur, please use more descriptive topic titles.


----------



## Bateleur (Feb 19, 2010)

I did not install any swing port/package. I thought it was installed by default with the jdk. I will try that and see if it fixes my problem.

Thanks!

@DutchDaemon: I will do that - use more descriptive topic titles - in the future. 

Cheers!


----------



## Ievgen (May 8, 2012)

*Solved*

Hi guys, everyone looking for solution here are the steps:

Install linux-sun-jdk1.6.0
Edit the $ANDROID_SDK_HOME/tools/android script, replace the following line:

```
java_cmd="java"
```
with this:

```
java_cmd="/usr/local/linux-sun-jdk1.6.0/bin/java"
```

Run */compat/linux/bin/bash* as root
Locate the libswt-gtk-3550.so file on your machine, mine was located in /var/tmp/swtlib-64 (don't ask me why)
*ldconfig -v /var/tmp/swtlib-64*
Verify: *ldconfig -p | grep swt*
Close linux terminal
You should be able to launch SDK manager now.


----------



## royj (Sep 29, 2012)

*adb only*

If you need just adb, try this - http://blog.bsdroid.org/?category_name=adb ( http://bsdroid.org/downloads/adb.tar.bz2 )
Works for me, FreeBSD 9.0-RELEASE-p3 i386, Atrix 4G MB860


----------



## jotawski (Oct 3, 2012)

Ievgen said:
			
		

> Hi guys, everyone looking for solution here are the steps:
> 
> Install linux-sun-jdk1.6.0
> Edit the $ANDROID_SDK_HOME/tools/android script, replace the following line:
> ...


Hi sirs,

Apologized me but I do not know where $ANDROID_SDK_HOME is.


----------



## YZMSQ (Oct 28, 2012)

jotawski said:
			
		

> Hi sirs,
> 
> Apologized me but I do not know where $ANDROID_SDK_HOME is.


Mine is ~/.android-sdk-linux. You could check it.


----------



## laufdi (Aug 21, 2013)

I have no libswt-gtk-3550.so but /usr/local/lib/libswt-gtk-3557.so after installing the swt port. I can run tools/android with native java when I link libswt-gtk-3557.so to libswt-gtk.so and libswt-pi-gtk-3557.so to libswt-pi-gtk.so. But then I get

```
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.eclipse.swt.internal.gtk.OS._G_TYPE_INT()J
        at org.eclipse.swt.internal.gtk.OS._G_TYPE_INT(Native Method)
        at org.eclipse.swt.internal.gtk.OS.G_TYPE_INT(Unknown Source)
        at org.eclipse.swt.widgets.Tree.getColumnTypes(Unknown Source)
        at org.eclipse.swt.widgets.Tree.createHandle(Unknown Source)
        at org.eclipse.swt.widgets.Widget.createWidget(Unknown Source)
        at org.eclipse.swt.widgets.Control.createWidget(Unknown Source)
        at org.eclipse.swt.widgets.Scrollable.createWidget(Unknown Source)
        at org.eclipse.swt.widgets.Tree.createWidget(Unknown Source)
        at org.eclipse.swt.widgets.Control.<init>(Unknown Source)
        at org.eclipse.swt.widgets.Scrollable.<init>(Unknown Source)
        at org.eclipse.swt.widgets.Composite.<init>(Unknown Source)
        at org.eclipse.swt.widgets.Tree.<init>(Unknown Source)
        at org.eclipse.jface.viewers.CheckboxTreeViewer.<init>(CheckboxTreeViewer.java:81)
        at com.android.sdkuilib.internal.repository.ui.PackagesPage.createContents(PackagesPage.java:210)
        at com.android.sdkuilib.internal.repository.ui.PackagesPage.<init>(PackagesPage.java:181)
        at com.android.sdkuilib.internal.repository.ui.SdkUpdaterWindowImpl2.createContents(SdkUpdaterWindowImpl2.java:192)
        at com.android.sdkuilib.internal.repository.ui.SdkUpdaterWindowImpl2.open(SdkUpdaterWindowImpl2.java:139)
        at com.android.sdkuilib.repository.SdkUpdaterWindow.open(SdkUpdaterWindow.java:111)
        at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:356)
        at com.android.sdkmanager.Main.doAction(Main.java:334)
        at com.android.sdkmanager.Main.run(Main.java:120)
        at com.android.sdkmanager.Main.main(Main.java:103)
```

So I should probably use the Linux JDK. There I don't have libswt-gtk-3550.so etc. I copied them to /compat/linux/usr/lib. Now I get the same result as above.


----------

