# AndroidSDK -- has anyone got it to work?



## kr651129 (Jun 25, 2012)

Has anyone here got the AndroidSDK to work on their machine?  I found http://www.BSDroid.org but it doesn't have 100% java/eclipse support.  The following is what I'm getting when I try and install the SDK


```
$ ./android sdk
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.sdkmanager.Main.showSdkManagerWindow(Main.java:323)
	at com.android.sdkmanager.Main.doAction(Main.java:289)
	at com.android.sdkmanager.Main.run(Main.java:120)
	at com.android.sdkmanager.Main.main(Main.java:103)
```


----------



## wblock@ (Jun 25, 2012)

Which Java do you have installed?


----------



## kr651129 (Jun 25, 2012)

I'm not in front of my machine right now but I remember the output of

`$ java -version`

Was v1.6


----------



## wblock@ (Jun 25, 2012)

If it's java/jdk16, java/openjdk6 may work.  Or the other way around.  There's also java/openjdk7.


----------



## kr651129 (Jun 25, 2012)

If I install one of those will I need to pass the location to ./android sdk or should I remove the Java I have and install one of these?


----------



## wblock@ (Jun 26, 2012)

See java/javavmwrapper.  I think it will let you switch between multiple versions, but haven't really investigated.


----------



## kr651129 (Jun 26, 2012)

wblock -- thanks for the input but java/openjdk7 didn't work and I already had java/javavmwrapper installed.

What has got me to the next step is the following [cmd=]$ ./android update sdk --no-ui[/cmd]

And it's downloading the files now, I'll update everyone once I get past that.


----------



## wblock@ (Jun 26, 2012)

Doh--I think you need to install x11-toolkits/swt.  It might actually need a Linux version, though.


----------



## kr651129 (Jun 26, 2012)

Well the --no-ui option worked for updating the files, I've run into other problems on the Eclipse side now, but I did install x11-toolkits/swt and that didn't make any difference.


----------



## gkontos (Jun 26, 2012)

We recently had to make an installation and everything is working fine. I followed the solution that I found in this thread.


----------



## kr651129 (Jun 27, 2012)

Thank you gkontos but I'm not out of the woods just yet, I don't have /usr/local/linux-sun-jdk1.6.0/bin/java and when I try and run bash I get an error.


```
$ which java
/usr/local/bin/java
# /compat/linux/bin/bash
ELF binary type "3" not known.
/compat/linux/bin/bash: Exec format error. Binary file not executable.
```

I had use edit $SDKHOME/tools/android so java_cmd="/usr/local/openjdk6/bin/java"

As you can see I'm getting errors with bash, no idea why?

But I did find /usr/local/lib/eclipse/configuration/org.eclipse.osgi/bundles/150/1/.cp/libswt-gtk-3659.so


----------



## kr651129 (Jun 27, 2012)

I was able to do all of the steps in that post with a few modifications but I still can't run it the way it's supposed to be run.  I think it's because $SDKHOME/tools/android is looking for swt-gtk-3550 but I have libswt-gtk-3659.so.


----------



## gkontos (Jun 27, 2012)

swt-gtk-3550 was located in /tmp in my case! (go figure).

The installation was performed inside a jail.


----------



## kr651129 (Jun 27, 2012)

I've hit a wall with this, because I don't have that file.


```
$ locate swt-gtk
/usr/local/lib/eclipse/configuration/org.eclipse.osgi/bundles/150/1/.cp/libswt-gtk-3659.so
/usr/local/lib/eclipse/swt-gtk-3.6.2.jar
/usr/local/lib/eclipse/swt-gtk.jar
```


----------

