1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Android SDK update tool

Discussion in 'Userland Programming and Scripting' started by Bateleur, Feb 19, 2010.

  1. Bateleur

    Bateleur New Member

    Messages:
    34
    Thanks Received:
    0
    Hi,

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

    Code:
    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!
     
  2. OH

    OH New Member

    Messages:
    209
    Thanks Received:
    32
    usr/ports]# make search name=swt
    Code:
    (...)
    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?
     
  3. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Messages:
    10,721
    Thanks Received:
    2,136
    @Bateleur, please use more descriptive topic titles.
     
  4. Bateleur

    Bateleur New Member

    Messages:
    34
    Thanks Received:
    0
    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!
     
  5. Ievgen

    Ievgen New Member

    Messages:
    22
    Thanks Received:
    4
    Solved

    Hi guys, everyone looking for solution here are the steps:
    1. Install linux-sun-jdk1.6.0
    2. Edit the $ANDROID_SDK_HOME/tools/android script, replace the following line:
      Code:
      java_cmd="java"

      with this:
      Code:
      java_cmd="/usr/local/linux-sun-jdk1.6.0/bin/java"
    3. Run /compat/linux/bin/bash as root
    4. Locate the libswt-gtk-3550.so file on your machine, mine was located in /var/tmp/swtlib-64 (don't ask me why)
    5. ldconfig -v /var/tmp/swtlib-64
    6. Verify: ldconfig -p | grep swt
    7. Close linux terminal
    You should be able to launch SDK manager now.
     
    royj, YZMSQ, kr651129 and 1 other person thank for this.
  6. royj

    royj New Member

    Messages:
    7
    Thanks Received:
    1
    YZMSQ thanks for this.
  7. jotawski

    jotawski Member

    Messages:
    198
    Thanks Received:
    4
    Hi sirs,

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

    YZMSQ Member

    Messages:
    218
    Thanks Received:
    20
    Mine is ~/.android-sdk-linux. You could check it. ;)
     
  9. laufdi

    laufdi New Member

    Messages:
    78
    Thanks Received:
    1
    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
    Code:
    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.