Problems installing Android SDK in Meteor Workspace

android
meteor

#1

Hi there,

I’m trying to install the Android SDK in a Meteor Workspace. I downloaded the Android .tgz, unpackaged it, updated it, but am receiving this error when I attempt to run the file Android.

Exception in thread “main” org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.widgets.Display.createDisplay(Unknown Source)
at org.eclipse.swt.widgets.Display.create(Unknown Source)
at org.eclipse.swt.graphics.Device.(Unknown Source)
at org.eclipse.swt.widgets.Display.(Unknown Source)
at org.eclipse.swt.widgets.Display.(Unknown Source)
at org.eclipse.swt.widgets.Display.getDefault(Unknown Source)
at org.eclipse.swt.widgets.Shell.(Unknown Source)
at org.eclipse.swt.widgets.Shell.(Unknown Source)
at com.android.sdkuilib.internal.repository.ui.SdkUpdaterWindowImpl2.createShell(SdkUpdaterWindowImpl2.java:168)
at com.android.sdkuilib.internal.repository.ui.SdkUpdaterWindowImpl2.open(SdkUpdaterWindowImpl2.java:137)
at com.android.sdkuilib.repository.SdkUpdaterWindow.open(SdkUpdaterWindow.java:111)
at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:413)
at com.android.sdkmanager.Main.doAction(Main.java:391)
at com.android.sdkmanager.Main.run(Main.java:151)
at com.android.sdkmanager.Main.main(Main.java:117)

Any idea what might be going wrong?

Many thanks,

Matt


#2

This post should help out:


#3

Hi Brady,

Many thanks for the swift reply. This seems to advance things somewhat, but only to this error:

SWT folder '/home/ubuntu/workspace/android-sdk-linux/tools/lib/OpenJDK 64-Bit Server VM warning: Insufficient space for shared memory file:
6740
Try using the -Djava.io.tmpdir= option to select an alternate temp location.

x86_64’ does not exist.
Please export ANDROID_SWT to point to the folder containing swt.jar for your platform.

Any ideas?


#4

Sounds like you’re running out of disk space in your project and that’s causing subsequent errors.


#5

Weirdly, I now can’t even replicate that memory message and am just back to the original error. The line of update code in your previous link was clearly successful, since if I run it again it shows all elements as already up to date.


#6

Still no joy with this at all. Looking at some other Ubuntu install guidelines, it looks like it might be necessary to set a path, e.g.:

vi ~/.zshrc << EOT

export PATH=${PATH}:$HOME/sdk/android-sdk-linux/platform-tools:$HOME/sdk/android-sdk-linux/tools:$HOME/sdk/android-sdk-linux/build-tools/22.0.1/

EOT

source ~/.zshrc

But this path won’t work for Cloud9. Or am I barking up the wrong tree?


#7

Maybe @curtp has some insight on this. Did you get it working before?


#8

I did get it working. Once I got the required library installed, everything went smoothly. I didn’t encounter the error that @Matt_Keefe is. Sorry, probably won’t be much help here. ;(


#9

Okay, I got it working by setting the path for ANDROID_HOME as follows:

export ANDROID_HOME=~/workspace/android-sdk-linux
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Unfortunately, I’m now getting a problem where the meteor run android-device command takes up all my RAM and gets killed, but I guess that’s a separate problem…


#10

I’m having a similar issue and I’ve followed the 2 rabbit holes mentioned above that loop back to this thread.

My error message after running : meteor add-platform android has stayed the same all day:

I have my .zshrc file set to the same as @Matt_Keefe mentioned on March 19th.

I’m at a loss, but I feel like this should be something we should have relatively easy and be able to share a public environment of it to clone if someone figured this out?


#11

Okay I believe I fixed my issue. The linked instructions mentioned above and in the other threads on this topic tell you to follow this page line by line. I’d link that location but C9 apparently won’t let me link to 2 links in a single reply due to some weird forums rule. Apologies in advance to people in the future looking for the same answer I was if you can’t find the link above.

In that link:

The following section though is incorrect on C9:
# set path
vi ~/.zshrc << EOT

export PATH=${PATH}:$HOME/sdk/android-sdk-linux/platform-tools:$HOME/sdk/android-sdk-linux/tools:$HOME/sdk/android-sdk-linux/build-tools/22.0.1/

EOT

The correct file is .bashrc not .zshrc.

My terminal starts ghosting when trying to edit the .bashrc file so I had to add the two lines near the top of the file but this allowed the meteor add-platform android to run perfectly and complete without errors.