App crashes in FroYo & Gingerbread
<p>--The anonymous answer is my answer that I solved this issue with.--</p>

<p>I have been writing an app for Android, all is working well in Honeycomb, but not playing nice on my FroYo &amp; Gingerbread devices (opposite of what you'd expect right).</p>

<p>Here is the code that I believe is causing the issue:</p>

<pre><code>@Override
protected void onStart() {
    int versionNumber = Integer.valueOf(android.os.Build.VERSION.SDK);
    if (versionNumber == 11) {
        super.onStart();
        ActionBar actionBar = this.getActionBar();
        actionBar.setDisplayHomeAsUpEnabled(true);
    }
}
</code></pre>

<p>Here I implement the ActionBar's icon-up-to-home ability, I added the versionNumber variable as I believed the lack of an ActionBar in pre-Honyecomb devices was causing the issue when the activity was run, but it still crashes and I believe this is the issue, although I am terrible with debugging and don't understand anything I am given by logcat.</p>

<p>Any help would be greatly appreciated, have a good day!</p>

<p>Edit: logcat - I hope I got the right section?!</p>

<blockquote>
  <p>08-20 17:21:41.326: WARN/ActivityManager(2707): Trying to launch
  com.squirculardesign.android.pixel/.About 08-20 17:21:41.346:
  INFO/dalvikvm(4059): Could not find method
  com.squirculardesign.android.pixel.About.getActionBar, referenced from
  method com.squirculardesign.android.pixel.About.onStart 08-20
  17:21:41.346: WARN/dalvikvm(4059): VFY: unable to resolve virtual
  method 54: Lcom/squirculardesign/android/pixel/About;.getActionBar
  ()Landroid/app/ActionBar; 08-20 17:21:41.346: DEBUG/dalvikvm(4059):
  VFY: replacing opcode 0x6e at 0x0011 08-20 17:21:41.346:
  DEBUG/dalvikvm(4059): VFY: dead code 0x0014-0018 in
  Lcom/squirculardesign/android/pixel/About;.onStart ()V 08-20
  17:21:41.386: INFO/ALSAModule(2588): Initialized ALSA PLAYBACK device
  hifi 08-20 17:21:41.386: WARN/AudioFlinger(2588): write blocked for
  108 msecs, 3 delayed writes, thread 0x5e758 08-20 17:21:41.406:
  DEBUG/dalvikvm(4059): GC_EXTERNAL_ALLOC freed 38K, 52% free
  2621K/5379K, external 190K/518K, paused 36ms 08-20 17:21:41.596:
  INFO/AudioFlinger(2588): stop output streamType (0, 1) for 1 08-20
  17:21:41.596: DEBUG/AudioHardwareYamaha(2588):
  AudioStreamOut::setParameters(keyValuePairs="stop_output_streamtype=1")
  08-20 17:21:42.096: ERROR/yamaha::media::Parameters(2588): SalesCode =
  OPS 08-20 17:21:42.671: ERROR/lights(2707): write_int: path
  /sys/devices/virtual/misc/melfas_touchkey/brightness, value 2 08-20
  17:21:42.671: WARN/PowerManagerService(2707): Timer 0x7->0x3|0x3 08-20
  17:21:42.671: INFO/PowerManagerService(2707): Ulight 7->3|0 08-20
  17:21:42.671: DEBUG/PowerManagerService(2707): setLightBrightness :
  mButtonLight : 0 08-20 17:21:43.666: INFO/ALSAModule(2588): Terminated
  ALSA PLAYBACK device hifi 08-20 17:21:44.086:
  ERROR/yamaha::media::Parameters(2588): SalesCode = OPS 08-20
  17:21:51.181: WARN/ActivityManager(2707): Launch timeout has expired,
  giving up wake lock! 08-20 17:21:51.336: WARN/ActivityManager(2707):
  Activity idle timeout for HistoryRecord{40a6f0a8
  com.squirculardesign.android.pixel/.About} 08-20 17:21:56.456:
  DEBUG/dalvikvm(2929): GC_EXPLICIT freed 672K, 53% free 3917K/8327K,
  external 12588K/12670K, paused 121ms 08-20 17:22:01.876:
  INFO/StatusBarPolicy(2834): onSignalStrengthsChanged 08-20
  17:22:04.006: DEBUG/BatteryService(2707): update start 08-20
  17:22:04.011: ERROR/BatteryService(2707): TMU status = 0 08-20
  17:22:04.011: DEBUG/BatteryService(2707): updateBattery level:79
  scale:100 status:2 health:2 present:true voltage: 4050 temperature:
  270 technology: Li-ion AC powered:false USB powered:true icon:17302229</p>
</blockquote>
