Why does my app not work on Android 2.3?

just a quick question about Android 2.3.

I've been receiving reports from people using my app that it crashes on startup in Android 2.3. It works absolutely fine on the other SDK versions as far as I can tell. Since I don't have a phone running Android 2.3 I can't test out where the error is, which makes it very frustrating to deal with!

Has anyone got any ideas what might have changed in Android 2.3 to mean the app crashes? Has anyone else had a similar problem?

The following are ideas I've had for what might be causing it...

  1. Splash screen - on my main activity I trigger this in onCreate and it displays for 3 secs before finishing
  2. I'm using the GPS capability of Android, has this vastly changed in 2.3 to mean that something's going wrong?
  3. There's been a fundamental change in application startup in 2.3 that I'm not aware of.

Any feedback would be much appreciated!


With the help of someone running it on the Nexus S I've tracked down the problem to the following method:

final AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("GPS functionality is required for this app. Would you like to      enable it?")
           .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
               public void onClick(final DialogInterface dialog, final int id) {
           .setNegativeButton("No", new DialogInterface.OnClickListener() {
               public void onClick(final DialogInterface dialog, final int id) {
    final AlertDialog alert = builder.create();

Does anyone know why this suddenly won't work on Android 2.3 and/or how to fix it?

Many thanks!


All my apps use this:


Helps you track down bugs easily.

If this is an unofficial build of Gingerbread, GPS is most likely broken. On all builds I have tried, the GPS does not work. When the app searches for GPS it can't find it, so it will crash. This exact behavior happens in the stock browser in 2.3 for the Moto Droid. Because it loads google.com and asks for location with GPS, it crashes. If this occurs on an official build(currently only Nexus S?), then ignore all of this.

Need Your Help

Is there any way in Struts 2 by which I can get all namespaces in my app?

struts2 struts

Is there any way in Struts2 by which I can get list of namespaces in my App ?

How do I pass a javascript variable through a URL?

javascript php

I've recently learned 2 simple functions...