Monthly Archives: January 2011

Solution for Android Emulator Starts But App Doesn’t Run

I recently got started with Android app development.  My motivation for this, is that I decided to add tabata to my training regime.  This is something I’ve wanted to do for ages, but has only recently become possible (yay for January sales and cheap heavy bag stands!).  There are a few tabata apps out there, but none are quite what I want, so I decided to make my own.

I downloaded and installed Eclipse, since that’s the IDE used in the Android developer tutorials, and installed the Android SDK, then tried the Hello World tutorial.  When I ran it, the emulator started up, but the app didn’t run.

It turns out that this is a common problem, and there could be any number of causes.  I’m posting the solution that worked for me here, because it turns out I had two issues, and it’s likely that people following the tutorials may end up in a similar situation themselves.

The first issue I found was that I’d missed a step out of the Eclipse configuration process.  Under Run -> Run Configuration, I hadn’t set the Launch Action for Android applications.  I found that Launch Default Activity didn’t work reliably for me, so I’ve selected my application under Launch: which seems to work better.

Secondly, I’ve found that adb.exe has a tendency to hang.  The workaround for this is to attempt to run the application, and then give the emulator time to start up.  If your app doesn’t launch, use Task Manager to end task adb.exe (or kill the adb process if you’re using Linux).    Leave the emulator running, and re-run your application in Eclipse.

This technique seems to be working reliably for me.  Sometimes adb hangs again (and end tasking it solves that problem).  It would be nice if I could figure out why this is happening, but for now it works well enough, and my app is making good progress!

TortoiseSVN 1.7 Beginner’s Guide Due This Month!

TortoiseSVN 1.7 Beginner's Guide

TortoiseSVN 1.7 Beginner's Guide

OK, it’s time for a little shameless self promotion!  My second book, the TortoiseSVN 1.7 Beginner’s Guide, is due out this month!

It’s been a great experience working with Packt again.  This book was tech reviewed by TortoiseSVN‘s lead developer – Stefan Kung, and I’d like to thank him (and the rest of the reviewers and Packt team) for all the effort he put in to making sure the book was up-to-date, and correct.  I’ve been on both sides of the tech review process.  As a tech reviewer it’s easy to lose patience with an author, and it takes skill to provide constructive criticisim in a nice way, but that’s exactly what I got, and I’m extremely grateful!

It’s a great feeling to see a book in print at any time of the year, but especially now – a great start to 2011.