Engineering
established 11 years ago

The plan, once I finish up the Twitter Bootstrap conversion of the site, is to build a mobile app. I'm on the fence as to whether I want to try Appcelerator Titanium to re-use at least some portion of the code between platforms or whether I just want to go Native and target Android exclusively first. (I know, I know, you're supposed to bite the bullet, deal with Objective-C and target the iPhone first.)

Regardless, I need to get the Google SDK installed and the emulator working which proved to be far more challenging than I had initially expected due to a confluence of problems.

The Android emulator would hang when loading and would display the following error message:

Failed to load libGL.so
error libGL.so: cannot open shared object file: No such file or directory

This is easiest to see if you launch the emulator from the command line:

/path/to/sdk/tools/emulator -avd <name of avd>

At first I thought it was a missing 32 bit library issue as I'm on Ubuntu 64, but after some searching I came across this stackoverflow thread which indicated that symlinking libGL.so.1 to the sdk/tools/lib directory would resolve it:

ln -s/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /path/to/sdk/tools/lib/libGL.so

After this, in my case, the emulator would just hang with the error:

FB::flushWindowSurfaceColorBuffer: window handle 0x4 not found
FB: closeColorBuffer cb handle 0x3 not found

I found this stackoverflow thread that indicated "host GPU support" is only available for API levels 15 and higher. Because I'm experimenting with Titanium I needed to use API level 14. The solution is to uncheck Host GPU support.

So now I have a functioning android emulator under Ubuntu 14.04 LTS.

    You must be a member of this group to post comments.

    Please see the top of the page to join.

    Link Details