Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android emulator crashes on Ubuntu 11.10

I installed the Android SDK on my Ubuntu 11.10 (32-bit) machine. I also installed Eclipse (3.7) and the associated plugins for Android development, all on openjdk6. Using eclipse, I successfully created an Android Virtual Device (using AVD Manager). However when I try to run this virtual device, through Eclipse OR using the "emulator" Android SDK executable, the emulated device shows up for a couple of seconds and then crashes with the following message:

[xcb] Unknown sequence number while processing queue [xcb] Most likely
this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.

emulator-arm: ../../src/xcb_io.c:273: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

Aborted

I tried googling the problem, but could not get a working solution. Some suggested switching from openjdk to the sun/oracle jdk. I tried this (openjdk6 -> oracle jdk7), but no change in the result. Also updated Ubuntu 11.10 using the latest patches with the same result again. My machine is an IBM Thinkpad R52 with Pentium M processor 1.73GHz, 1 GB RAM, with Ubuntu running out of an external hard drive.

Any idea?

like image 285
Pramod Avatar asked Nov 29 '11 15:11

Pramod


2 Answers

I had a permissions problem, much like Pramod's comment to the original question indicated. In my case, ddms wasn't executable.

To fix:

cd /path/to/android/sdk/tools

Once you're in the tools folder:

chmod +x ddms

The same approach should work if you have any other non-executable files causing similar problems.

like image 158
StackExchange What The Heck Avatar answered Nov 10 '22 00:11

StackExchange What The Heck


I also faced the same problem, and finally got this solution:

  1. Newly install Android SDK tools & Support Library from AVD manager
  2. Don't use an old SDK which is copied from previous place
  3. Download latest SDK from Android AVD manager
  4. Set Preferences

Finally, restart Eclipse & PC

like image 32
sravan Avatar answered Nov 09 '22 22:11

sravan