LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-31-2011, 05:17 AM   #1
kemsiro
Member
 
Registered: Sep 2007
Location: Vietnam
Distribution: Slackware
Posts: 38

Rep: Reputation: 15
Unhappy Could not start Android emulator in Slackware 13.1


Hi all my friends,

Is there anyone faced this problem? I installed android SDK together with eclipse Helios 3.6.1. I downloaded and installed all android package and setup a virtual device in android 2.1 (then 2.2, 2.3). However, when I click "start" device in "android SDK and avd manager", the dialog appear and then close, but nothing happen more.

I also try to run it from console by change to tools directory of android SDK and run, but it also not work, there is only one line of desperate result: "Segmentation fault".
I also try to add "-no-audio" as many forums advice, but it just keep the result segmentation fault.

My device I configured to have 32MiB of SD card (and I tried 16MiB or more also).

I also created the helloworld application, then try to start it, but it just stop at "Launching a new emulator with Virtual Device a2" (a2 is name of my device), and nothing more happen, I also added "-no-audio" to run configuration but I still there.

By now, I have not seen any virtual devices appear. I also tried to uninstall and install again all the packages of android, but nothing help.

Here is the screen when I use GDB to figure out where is the fault:
Quote:
tqminh@kemsiro:/mnt/sda9/android-sdk-linux_x86/tools$ gdb emulator
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-slackware-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /mnt/sda9/android-sdk-linux_x86/tools/emulator...(no debugging symbols found)...done.
(gdb) run
Starting program: /mnt/sda9/android-sdk-linux_x86/tools/emulator

Program received signal SIGSEGV, Segmentation fault.
0xb7fec3fc in _dl_relocate_object () from /lib/ld-linux.so.2
(gdb)
Have you experience my desperate situation or could you suggest what can I do to solve it?
Thank you very much.

Last edited by kemsiro; 01-31-2011 at 05:26 AM.
 
Old 02-03-2011, 05:26 PM   #2
kemsiro
Member
 
Registered: Sep 2007
Location: Vietnam
Distribution: Slackware
Posts: 38

Original Poster
Rep: Reputation: 15
Anyone has solution to my hopeless situation ?
 
Old 02-04-2011, 10:45 AM   #3
devwatchdog
Member
 
Registered: Jan 2010
Posts: 202

Rep: Reputation: 47
Is your Slackware install a 32 bit or 64 bit system?

I created a 64 bit virtual machine, and grabbed the latest & greatest Android SDK, and find that there are 32 bit libraries needed to run it properly.

I have Eclipse/Android SDK running on my Ubuntu box, and really haven't any need to go through the process of installing the 32 bit compatibility libraries on this install. The only reason it exists is because I thought I'd take a look at your problem. The multilib conversion doesn't look like that big of a deal, however.

Hmmnn...I'm thinking you must be on a 32 bit system, as you'd not be able to create a SD card if you were using 64. Everything was moving along properly, until I created a virtual device, and needed to define a SD card. That produces an error. Trying to create it manually with tools/mksdcard generates a file not found error, and after a bit of poking about on a search engine, leads me to believe it is related to 32/64 bit library issues.

Anyhow, let us know what the platform is.
 
Old 02-04-2011, 11:34 AM   #4
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
Hello,

On my side, I don't have that kind of problem with android-sdk running on Slackware-64 (13.0, 13.1) with multilib.

After reading your post, I also tested it on Slackware-32 13.1 and I've no issue at all.

I searched a bit on the net and found only this link (http://code.google.com/p/android/issues/detail?id=4516) which seems to relates to the same kind of problem
you have. However, I guess you already found it.

As the gdb trace is a bit small, it's difficult to figure out what the (real) issue. Can you give the result of "run -avd a2" ?

Have you tried with an avd created using the command line (with and without sdcard) like below :

Code:
$ cd /mnt/sda9/android-sdk-linux_x86/tools

$ android create avd --name test1 --target 5 
...
$ emulator -avd test1
...
$ android create avd --name test2 --target 5 --sdcard 32M
...
$ emulator -avd test2

--
SeB
 
Old 02-04-2011, 03:16 PM   #5
devwatchdog
Member
 
Registered: Jan 2010
Posts: 202

Rep: Reputation: 47
I installed the multilib packages (Thanks Eric!) and fired up an Android virtual device without any problems.
 
Old 02-09-2011, 02:03 AM   #6
kemsiro
Member
 
Registered: Sep 2007
Location: Vietnam
Distribution: Slackware
Posts: 38

Original Poster
Rep: Reputation: 15
Hi all,

I am sorry because I am away last days.
My platform is 32 bit.

Here is the result when I run the command run -avd a2 of gdb (the current directory is /mnt/sda9/android-sdk-linux_x86/tools):
Quote:
(gdb) run -avd a2
Starting program: /mnt/sda9/android-sdk-linux_x86/tools/emulator -avd a2

Program received signal SIGSEGV, Segmentation fault.
0xb7fec3fc in _dl_relocate_object () from /lib/ld-linux.so.2
and the creation of device by command:

Quote:
bash-4.1$ android create avd --name test1 --target 5
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/sdkmanager/Main
Caused by: java.lang.ClassNotFoundException: com.android.sdkmanager.Main
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.android.sdkmanager.Main. Program will exit.
Quote:
bash-4.1$ android create avd --name test2 --target 5 --sdcard 32M
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/sdkmanager/Main
Caused by: java.lang.ClassNotFoundException: com.android.sdkmanager.Main
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.android.sdkmanager.Main. Program will exit.
Does the error cause by the lack of seting proper path for my android SDK or Java (my machine has JRE & JDK 6u23 as Slack -current)?
My current folder of the SDK is /mnt/sda9/android-sdk-linux_x86

How can I set the path for my SDK? Which file do I need to edit?

Quote:
bash-4.1$ cat ~/.bashrc
export PATH=$PATH:/mnt/sda9/android-sdk-linux_x86/
bash-4.1$ cat ~/.profile
export PATH=/home/tqminh:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib/java/bin:/usr/lib/kde4/libexec:/usr/kerberos/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.
Here is the result when I run echo $PATH:
Quote:
/home/tqminh:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib/java/bin:/usr/lib/kde4/libexec:/usr/kerberos/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.:/mnt/sda9/android-sdk-linux_x86/

Last edited by kemsiro; 02-09-2011 at 02:40 AM.
 
Old 02-09-2011, 10:56 AM   #7
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
Hello

Quote:
Originally Posted by kemsiro View Post
I am sorry because I am away last days.
My platform is 32 bit.
Later on your post you're talking about -current. So, you're using 32-bit version of Slackware-current. Is that right ?


Quote:
Originally Posted by kemsiro View Post
Here is the result when I run the command run -avd a2 of gdb (the current directory is /mnt/sda9/android-sdk-linux_x86/tools):

Code:
(gdb) run -avd a2
Starting program: /mnt/sda9/android-sdk-linux_x86/tools/emulator -avd a2

Program received signal SIGSEGV, Segmentation fault.
0xb7fec3fc in _dl_relocate_object () from /lib/ld-linux.so.2
Well, I was expecting more information from gdb. So, as it seems that you're using Slackware-32/current,
I tried android onto a freshly installed slackware-32/current (using unofficial iso from here)
and I have no problem to create avd nor to start the emulator. Therefore, I'm wondering whether there's not something wrong with your installation.

Quote:
Originally Posted by kemsiro View Post
and the creation of device by command:
Code:
bash-4.1$ android create avd --name test1 --target 5
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/sdkmanager/Main
Caused by: java.lang.ClassNotFoundException: com.android.sdkmanager.Main
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.android.sdkmanager.Main. Program will exit.
It seems that your android installation is broken. Could you give the result of :

1 :
Code:
java -Xmx256M -Dcom.android.sdkmanager.toolsdir="/mnt/sda9/android-sdk-linux_x86/tools" -classpath "/mnt/sda9/android-sdk-linux_x86/tools/lib/sdkmanager.jar:/mnt/sda9/android-sdk-linux_x86/tools/lib/x86/swt.jar" com.android.sdkmanager.Main create avd --name test1 --target 5
2 :

Code:
 
ls -l /mnt/sda9/android-sdk-linux_x86/tools/lib
Hoping this will help identifying your issue.

Greetings.

--
SeB
 
Old 02-09-2011, 06:38 PM   #8
kemsiro
Member
 
Registered: Sep 2007
Location: Vietnam
Distribution: Slackware
Posts: 38

Original Poster
Rep: Reputation: 15
Hi phenixia,

Thank you very much for your effort of helping me.
Yes, my platform is 32 bit -current. I upgrade my slackware to -current quite often (after there some things in change log), so I am afraid of reinstall it again.

Here is the result when I run the java command and ls command (with a normal user, not root):
java
Quote:
tqminh@kemsiro:/mnt/sda9/android-sdk-linux_x86/tools$ java -Xmx256M -Dcom.android.sdkmanager.toolsdir="/mnt/sda9/android-sdk-linux_x86/tools" -classpath "/mnt/sda9/android-sdk-linux_x86/tools/lib/sdkmanager.jar:/mnt/sda9/android-sdk-linux_x86/tools/lib/x86/swt.jar" com.android.sdkmanager.Main create avd --name test1 --target 5
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/sdkmanager/Main
Caused by: java.lang.ClassNotFoundException: com.android.sdkmanager.Main
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.android.sdkmanager.Main. Program will exit.
ls
Quote:
tqminh@kemsiro:/mnt/sda9/android-sdk-linux_x86$ ls -l /mnt/sda9/android-sdk-linux_x86/tools/lib
total 413
-rwxrwxrwx 1 root root 4737 Jan 31 09:06 android.el*
-rwxrwxrwx 1 root root 2733 Jan 31 09:06 androidprefs.jar*
-rwxrwxrwx 1 root root 32299 Jan 31 09:06 anttasks.jar*
-rwxrwxrwx 1 root root 1499 Jan 31 09:06 archquery.jar*
-rwxrwxrwx 1 root root 2172 Jan 31 09:06 build.export.template*
-rwxrwxrwx 1 root root 3206 Jan 31 09:06 build.template*
-rwxrwxrwx 1 root root 143847 Jan 31 09:06 commons-compress-1.0.jar*
-rwxrwxrwx 1 root root 205135 Jan 31 09:06 ddmlib.jar*
-rwxrwxrwx 1 root root 110990 Jan 31 09:06 ddms.jar*
-rwxrwxrwx 1 root root 411372 Jan 31 09:06 ddmuilib.jar*
-rwxrwxrwx 1 root root 12210 Jan 31 09:06 devices.xml*
-rwxrwxrwx 1 root root 49754 Jan 31 09:06 draw9patch.jar*
-rwxrwxrwx 1 root root 428218 Jan 31 09:06 emma.jar*
-rwxrwxrwx 1 root root 38232 Jan 31 09:06 emma_ant.jar*
-rwxrwxrwx 1 root root 434110 Jan 31 09:06 emma_device.jar*
drwxrwxrwx 1 root root 0 Jan 31 09:06 emulator/
-rwxrwxrwx 1 root root 5091376 Jan 31 09:06 groovy-all-1.7.0.jar*
-rwxrwxrwx 1 root root 816454 Jan 31 09:06 guavalib.jar*
-rwxrwxrwx 1 root root 4423 Jan 31 09:06 hardware-properties.ini*
-rwxrwxrwx 1 root root 31733 Jan 31 09:06 hierarchyviewer2.jar*
-rwxrwxrwx 1 root root 326957 Jan 31 09:06 hierarchyviewerlib.jar*
-rwxrwxrwx 1 root root 307734 Jan 31 09:06 jcommon-1.0.12.jar*
-rwxrwxrwx 1 root root 73010 Jan 31 09:06 jfreechart-1.0.9-swt.jar*
-rwxrwxrwx 1 root root 1291498 Jan 31 09:06 jfreechart-1.0.9.jar*
-rwxrwxrwx 1 root root 556045 Jan 31 09:06 jsilver.jar*
-rwxrwxrwx 1 root root 8580107 Jan 31 09:06 jython.jar*
-rwxrwxrwx 1 root root 3574 Jan 31 09:06 layoutopt.jar*
-rwxrwxrwx 1 root root 121442 Jan 31 09:06 monkeyrunner.jar*
-rwxrwxrwx 1 root root 105798 Jan 31 09:06 org.eclipse.core.commands_3.4.0.I20080509-2000.jar*
-rwxrwxrwx 1 root root 94652 Jan 31 09:06 org.eclipse.equinox.common_3.4.0.v20080421-2006.jar*
-rwxrwxrwx 1 root root 1041252 Jan 31 09:06 org.eclipse.jface_3.4.2.M20090107-0800.jar*
-rwxrwxrwx 1 root root 1831843 Jan 31 09:06 osgi.jar*
-rwxrwxrwx 1 root root 58 Jan 31 09:06 plugin.prop*
-rwxrwxrwx 1 root root 1159 Jan 31 09:06 proguard.cfg*
-rwxrwxrwx 1 root root 295277 Jan 31 09:06 sdklib.jar*
-rwxrwxrwx 1 root root 42467 Jan 31 09:06 sdkmanager.jar*
-rwxrwxrwx 1 root root 11127 Jan 31 09:06 sdkstats.jar*
-rwxrwxrwx 1 root root 232949 Jan 31 09:06 sdkuilib.jar*
-rwxrwxrwx 1 root root 12591 Jan 31 09:06 swing-worker-1.1.jar*
-rwxrwxrwx 1 root root 102323 Jan 31 09:06 traceview.jar*
-rwxrwxrwx 1 root root 20830 Jan 31 09:06 uix.jar*
drwxrwxrwx 1 root root 0 Jan 31 09:06 x86/
drwxrwxrwx 1 root root 0 Jan 31 09:06 x86_64/
 
Old 02-09-2011, 07:19 PM   #9
kemsiro
Member
 
Registered: Sep 2007
Location: Vietnam
Distribution: Slackware
Posts: 38

Original Poster
Rep: Reputation: 15
Ah, I think I found the problems.

It may be because the current file system I use to store the SDK is NTFS (I mounted a drive of NTFS file system as sda9).

When I move the whole tree to my home directory, it works fine. It works even more smoothly in my old computer than the new and more powerful one of my friend which is running Windows.

Anyway, I don't understand why it did not work when I place in NTFS file system.
 
Old 02-10-2011, 05:28 AM   #10
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
Hello,

Quote:
Originally Posted by kemsiro View Post
Ah, I think I found the problems.

It may be because the current file system I use to store the SDK is NTFS
[...]
Anyway, I don't understand why it did not work when I place in NTFS file system.
I tried android-sdk installed onto an ntfs partition and I was unable to reproduce the problem you have. Anyway,
that's good to read that you found a way to solve it.

Cheers.

--
SeB
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Android Development in Linux.How To install Android Emulator?? jeevanism Linux - Mobile 3 12-28-2010 10:24 AM
android emulator and debian testing - differences on two machines radiodee1 Linux - Mobile 1 08-17-2010 09:01 PM
Android Emulator to run OverDrive Media Console? Marianat Linux - Newbie 2 01-11-2010 10:58 PM
Having trouble running Android emulator on Arch Linux mohtasham1983 Linux - Mobile 0 03-13-2009 10:22 AM
Terminal Emulator Freezes on Start Up. xmeson Slackware 7 07-02-2008 08:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration