You are not logged in.

#1 2009-03-06 09:06:42

mohtasham1983
Member
Registered: 2008-12-15
Posts: 85

Getting Android SDK Working on Arch Linux

Hi,

I've been trying to install android on my computer running the 64 bit version of Arch Linux.

Since I wanted to use Android with eclipse, first I installed eclipse 3.4.1 from pacman. Then I downloaded android zip file and extracted in a directory. Then according to the instructions available on their website, I tried to install ADT plugin for Eclipse. Since, Android editor depended on wst plugin, and wst depended on some other plugin, I forgot about installing wst and just installed Android Development Tools (ADT).

In the next step, I had to map the sdk directory to the eclipse by going to Window - Preferences - Android. After pressing browse I found my extracted SDK directory. When I pressed apply, I got the following error:

[2009-03-06 00:37:19 - adb]Failed to get the adb version: Cannot run program "/home/myname/android/sdk/tools/adb": java.io.IOException: error=2, No such file or directory

However, such files does exist. I don't know why it's complaining about it.

I was wondering if anyone was able to get android and eclipse running together on their Arch Linux machine?

Thanks in advance.

Offline

#2 2009-03-06 09:35:14

mohtasham1983
Member
Registered: 2008-12-15
Posts: 85

Re: Getting Android SDK Working on Arch Linux

Alright, I guess the problem is with the JDK.

I just downloaded Android SDK on my 32 bit ubuntu laptop. Then I went to tools, and double clicked on emulator on nautilus and was able to see the emulator. However, I'm not able to see such thing using my 64 bit Arch Linux machine.

Offline

#3 2009-03-06 20:27:57

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Getting Android SDK Working on Arch Linux

I'm not sure if you're getting jdk or 64 bit issues. I can't tell you how to set up eclipse, but this is all I did to get the sdk working:

pacman -R openjdk
pacman -S jdk
yaourt android-sdk
(use makepkg if you don't have yaourt installed)
cd /opt/android-sdk/
./tools/emulator

I'm using the jdk package rather than openjdk, but I don't know if that's necessary.

Dusty

Offline

#4 2009-03-06 20:28:30

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Getting Android SDK Working on Arch Linux

BTW, cool to see another android dev on Arch. :-)

Dusty

Offline

#5 2009-03-07 02:21:34

mohtasham1983
Member
Registered: 2008-12-15
Posts: 85

Re: Getting Android SDK Working on Arch Linux

First of all, I'm not an android dev. I just started looking at it yesterday. There's a long way ahead of me to be called an android dev.

I think there are some components of openjdk6 left on my computer. I remember when I first installed Arch, it came out with openjdk6. Once I was trying to install Vuze, but because of openjdk6 it didn't work. I uninstalled it and then installed Sun JDK, but still Vuze didn't download bittorrent files. Because of that, I forgot about Vuze and installed rtorrent. Since rTorrent was a really CLI based application I really liked it.

A few weeks ago I was going to give a try to KDE, so when I installed it, it complained about the conflict between JDK and openjdk. That is, I uninstalled JDK in order to installed KDE. After using KDE for a few days, I didn't like it, so I uninstalled it.

Yesterday, to get android working, I uninstalled openjdk and installed Sun JDK. That's why I think there are some components of openjdk left on my computer that don't allow me to run the android emulator using ./emulator command.

PS. I don't know why they ship Arch with the openjdk6. Isn't Sun JDK open source now? I really appreciate the effort they put on developing openjdk, but most applications have problem with it.

Offline

#6 2009-03-13 23:08:08

alienman
Member
From: Mexico
Registered: 2008-07-08
Posts: 106

Re: Getting Android SDK Working on Arch Linux

Sun JDK is not 100% opensource yet, that's why openjdk is the prefered default application but it is also true that openjdk doesn't have the entire API ported so it could lend some problems.

Some time ago there was a notice about this in the main archlinux webpage and they explained why they'll stay with openjdk if you are interested in reading it.

On the other hand, you can maybe try uninstalling with -Rcsn parameters in pacman, this can help you with some troubles you mentioned above.


ISC - Ignacio Marmolejo
ArchLinux & GNOME User.

Offline

#7 2009-03-14 05:44:22

mohtasham1983
Member
Registered: 2008-12-15
Posts: 85

Re: Getting Android SDK Working on Arch Linux

pacman -Rcsn openjdk6 removed the following packages from my computer:

Remove (4): swt-3.3.2-1  eclipse-3.4.1-1  bcprov-1.38-1  openjdk6-1.5-0.1

I installed jdk again, but still not able to run the emulator using ./emulator. It says no such file or directory, while it really exists.

Offline

#8 2009-03-20 11:50:46

tnull
Member
Registered: 2009-01-20
Posts: 3

Re: Getting Android SDK Working on Arch Linux

I had the same problem as you, but after installing a few packages I managed to get the emulator to run, I do not know if more are needed for the other tools, though.

The packages are:

lib32-libstdc++5
lib32-libx11
lib32-ncurses
lib32-zlib
lib32-sdl
lib32-libxext

Hopefully that will work for you as well. smile

Offline

#9 2009-03-24 03:19:28

mohtasham1983
Member
Registered: 2008-12-15
Posts: 85

Re: Getting Android SDK Working on Arch Linux

I just got back home and installed all packages that you mentioned. The emulator is working like a charm.

Thanks a lot.

Offline

#10 2009-04-04 19:56:19

funktion
Member
From: Providence, RI USA
Registered: 2006-07-10
Posts: 25
Website

Re: Getting Android SDK Working on Arch Linux

I had a few dependency issues with installing the ADT plugin for Eclipse, along with other plugins (Subclipse). I solved it by completely removing the pacman Eclipse package (pacman -R eclipse) and doing a manual install of Eclipse. Every plugin installed perfectly after that~


the funk soul brother.

Offline

#11 2009-06-08 11:58:32

endSly
Member
Registered: 2009-06-08
Posts: 3

Re: Getting Android SDK Working on Arch Linux

I've been trying to make it works but those packeges aren't avalaibles and it does not work with lib32 wich i have tried.
adb returns:
adb: error while loading shared libraries: libncurses.so.5: wrong ELF class: ELFCLASS64

and ddms retruns:
57:50 E/ddms: shutting down due to uncaught exception
57:50 E/ddms: java.lang.UnsatisfiedLinkError: /opt/android-sdk/tools/lib/libswt-pi-gtk-3236.so: /opt/android-sdk/tools/lib/libswt-pi-gtk-3236.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1767)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
        at java.lang.Runtime.loadLibrary0(Runtime.java:840)
        at java.lang.System.loadLibrary(System.java:1047)
        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:123)
        at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
        at org.eclipse.swt.widgets.Display.<clinit>(Display.java:126)
        at com.android.ddms.UIThread.runUI(UIThread.java:329)
        at com.android.ddms.Main.main(Main.java:97)

any idea??

Offline

#12 2009-06-09 13:37:16

pfleidi
Member
Registered: 2008-02-25
Posts: 5

Re: Getting Android SDK Working on Arch Linux

Hi endSly.

I had the same problem. I solved it with my modified PKGBUILD which defines a few dependencies an replaces SWT with a 64Bit-Version.

pkgname=android-sdk
pkgver=1.5_r2
pkgrel=1
pkgdesc="Google Android SDK"
arch=('i686' 'x86_64')
url="http://code.google.com/android/"
license=('custom')

if [ "$CARCH" = "x86_64" ]; then
   depends=('jre' 'lib32-libstdc++5' 'lib32-libx11' 'lib32-ncurses' 'lib32-zlib' 'lib32-sdl' 'lib32-libxext' 'swt')
else
   depends=('jre')
fi

source=(http://dl.google.com/android/android-sdk-linux_x86-$pkgver.zip \
        android.sh)

md5sums=('1d3c3d099e95a31c43a7b3e6ae307ed3' 'e7f23c39d02a3a280c746f7398bf5114')

build() {
  mkdir -p $pkgdir/opt &&amp; \
  mkdir -p $pkgdir/etc/profile.d &&amp; \
  mv $srcdir/android-sdk-linux_x86-$pkgver $pkgdir/opt/android-sdk &&amp; \
  cp $srcdir/android.sh $pkgdir/etc/profile.d &&amp; \
  rm  $pkgdir/opt/android-sdk/tools/lib/libswt* &&amp; \
  cp /usr/lib/libswt-* $pkgdir/opt/android-sdk/tools/lib &&amp; \
  cp /usr/share/java/swt.jar $pkgdir/opt/android-sdk/tools/lib &&amp; \
  cd $pkgdir/opt/android-sdk &&amp; \
  find -type d -exec chmod 755 \{\} \; &&amp; \
  find -exec chmod +r \{\} \; &&amp; \
  chmod +x $startdir/pkg/etc/profile.d/android.sh
}

I hope this will help you, too.

Offline

#13 2009-06-10 12:07:30

endSly
Member
Registered: 2009-06-08
Posts: 3

Re: Getting Android SDK Working on Arch Linux

but those dependends are not in AUR
depends=('jre' 'lib32-libstdc++5' 'lib32-libx11' 'lib32-ncurses' 'lib32-zlib' 'lib32-sdl' 'lib32-libxext' 'swt')

Offline

#14 2009-06-12 09:16:02

endSly
Member
Registered: 2009-06-08
Posts: 3

Re: Getting Android SDK Working on Arch Linux

ok, solved, i hadn't community repository

Offline

#15 2009-07-01 03:55:43

habitue
Member
Registered: 2009-01-14
Posts: 15

Re: Getting Android SDK Working on Arch Linux

I had this problem recently installing on Arch64.  I finally got it working by installing the aur/eclipse-jee package (this took me a while to find because I grepped for j2ee!).  I also had to add in /opt/java/bin and /opt/eclipse to my path, because for some reason the package build didnt add it.  Then instead of downloading the sdk, I used the eclipse upgrade URL for the ADT:

https://dl-ssl.google.com/android/eclipse/

Make sure you also install the android SDK

This is probably the better way to do it since it can be uninstalled later, and you don't have to do any manual installation.

Last edited by habitue (2009-07-01 04:08:18)

Offline

#16 2010-03-08 19:00:45

sxe
Member
Registered: 2009-06-04
Posts: 103

Re: Getting Android SDK Working on Arch Linux

Dusty wrote:

I'm not sure if you're getting jdk or 64 bit issues. I can't tell you how to set up eclipse, but this is all I did to get the sdk working:

pacman -R openjdk
pacman -S jdk
yaourt android-sdk
(use makepkg if you don't have yaourt installed)
cd /opt/android-sdk/
./tools/emulator

I'm using the jdk package rather than openjdk, but I don't know if that's necessary.

Dusty

Thx for this tip. Since yesterday i'm an Arch64 user too and your description made it easy for me to get my android development environment up and running. smile

btw, using openjdk6 works for me so far.. (i did not do heavy tests but everything seems to work so far)

cya

Offline

#17 2010-03-08 19:33:37

Themaister
Member
From: Trondheim, Norway
Registered: 2008-07-21
Posts: 652
Website

Re: Getting Android SDK Working on Arch Linux

Nice. I'm trying to look into Android development, which means I have to learn som java too I guess tongue. I want to stream audio from android with TCP to an rsound server tongue
Well, I got some C code running at least :'o Is there a good way to start a C program without an emulator?

Last edited by Themaister (2010-03-08 21:36:03)

Offline

#18 2010-04-21 06:44:23

MikeEnIke
Member
Registered: 2010-04-13
Posts: 15

Re: Getting Android SDK Working on Arch Linux

I know this is resurrection of the living dead, but I figured it's better than opening a new thread for one that's a month and a half old.

When I try to install ADT addon in eclipse I get this error in details

Cannot complete the install because one or more required items could not be found.
  Software being installed: Android Development Tools 0.9.6.v201002051504-24846 (com.android.ide.eclipse.adt.feature.group 0.9.6.v201002051504-24846)
  Missing requirement: Android Development Tools 0.9.6.v201002051504-24846 (com.android.ide.eclipse.adt.feature.group 0.9.6.v201002051504-24846) requires 'org.eclipse.wst.sse.core 0.0.0' but it could not be found

Anyone have a clue what that means?

Offline

#19 2010-04-21 11:45:39

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Getting Android SDK Working on Arch Linux

It means you should be looking for the eclipse-android package in the AUR.

Offline

#20 2010-04-21 15:26:45

MikeEnIke
Member
Registered: 2010-04-13
Posts: 15

Re: Getting Android SDK Working on Arch Linux

falconindy wrote:

It means you should be looking for the eclipse-android package in the AUR.

Ok, that enabled me to install the ADT addons for eclipse. I configured them so that my directory was /opt/android-sdk and when I run ./tool/emulator I get this :

[mike@myhost android-sdk]$ ./tools/emulator
emulator: ERROR: You did not specify a virtual device name, and the system
directory could not be found.

If you are an Android SDK user, please use '@<name>' or '-avd <name>'
to start a given virtual device (see -help-avd for details).

Otherwise, follow the instructions in -help-disk-images to start the emulator


Sorry to be such a pain, but thanks in advance

Offline

#21 2010-04-27 12:17:47

tnull
Member
Registered: 2009-01-20
Posts: 3

Re: Getting Android SDK Working on Arch Linux

MikeEnIke wrote:
falconindy wrote:

It means you should be looking for the eclipse-android package in the AUR.

Ok, that enabled me to install the ADT addons for eclipse. I configured them so that my directory was /opt/android-sdk and when I run ./tool/emulator I get this :

[mike@myhost android-sdk]$ ./tools/emulator
emulator: ERROR: You did not specify a virtual device name, and the system
directory could not be found.

If you are an Android SDK user, please use '@<name>' or '-avd <name>'
to start a given virtual device (see -help-avd for details).

Otherwise, follow the instructions in -help-disk-images to start the emulator


Sorry to be such a pain, but thanks in advance

This is because you must make an image (avd) to use with the emulator. To do so, you can run 'android' from the terminal, select the "Virtual Devices" option, and create avds. In addition this tool allows you to install documentation, sample code, and different platform versions.

Offline

#22 2010-06-07 21:46:57

acorscadden
Member
Registered: 2010-06-07
Posts: 1

Re: Getting Android SDK Working on Arch Linux

tnull wrote:

I had the same problem as you, but after installing a few packages I managed to get the emulator to run, I do not know if more are needed for the other tools, though.

The packages are:

lib32-libstdc++5
lib32-libx11
lib32-ncurses
lib32-zlib
lib32-sdl
lib32-libxext

Hopefully that will work for you as well. smile

..just somebody else confirming that this works for arch 64

thank you!!!!

Offline

#23 2010-08-23 03:07:33

Dave Cohen
Member
Registered: 2008-09-27
Posts: 126

Re: Getting Android SDK Working on Arch Linux

Hey all,

I'm quite new to android, and happily the android-sdk in aur seemed to install fine on my arch 64.  However...

I have no "targets" and running /opt/android-sdk/tools/android complains "a target must be selected in order to create an AVD."

Reading this thread and googling, I haven't found any answer.  Thanks in advance if you can help.

-Dave

Offline

#24 2010-08-23 03:11:54

Dave Cohen
Member
Registered: 2008-09-27
Posts: 126

Re: Getting Android SDK Working on Arch Linux

I did find an answer after all... http://stackoverflow.com/questions/2122 … eating-avd

The GUI is not intuitive!

Offline

#25 2010-09-15 13:42:47

Keeler
Member
Registered: 2010-01-19
Posts: 10

Re: Getting Android SDK Working on Arch Linux

Looks like I'm the latest necromancer for this thread.

I'm trying to get the android development software installed on my archlinux machine. I have android-sdk, eclipse, the eclipse-android plugin, and any other package I can find. However, I must not have installed something because I don't have the 'adb' command. What package am I missing?

Basically I want to be able to sync the droid and installed development packages and anything else that might not be available in the droid market app.

Offline

Board footer

Powered by FluxBB