Q: Android Application running perfectly in device but crashing in emulator I have developed an android application. This application runs perfectly in my device but crashes in emulator.
Since in my college we have to present the application in emulator, this error is creating a lot of problem.
Logcat
03-30 10:52:52.633: E/AndroidRuntime(257): Uncaught handler: thread main exiting due to uncaught exception
03-30 10:52:52.653: E/AndroidRuntime(257): java.lang.NoSuchMethodError: com.example.festipedia_logo.main.getActionBar
03-30 10:52:52.653: E/AndroidRuntime(257):  at com.example.festipedia_logo.main.onCreate(main.java:51)
03-30 10:52:52.653: E/AndroidRuntime(257):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-30 10:52:52.653: E/AndroidRuntime(257):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
03-30 10:52:52.653: E/AndroidRuntime(257):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
03-30 10:52:52.653: E/AndroidRuntime(257):  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
03-30 10:52:52.653: E/AndroidRuntime(257):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
03-30 10:52:52.653: E/AndroidRuntime(257):  at android.os.Handler.dispatchMessage(Handler.java:99)
03-30 10:52:52.653: E/AndroidRuntime(257):  at android.os.Looper.loop(Looper.java:123)
03-30 10:52:52.653: E/AndroidRuntime(257):  at android.app.ActivityThread.main(ActivityThread.java:4363)
03-30 10:52:52.653: E/AndroidRuntime(257):  at java.lang.reflect.Method.invokeNative(Native Method)
03-30 10:52:52.653: E/AndroidRuntime(257):  at java.lang.reflect.Method.invoke(Method.java:521)
03-30 10:52:52.653: E/AndroidRuntime(257):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
03-30 10:52:52.653: E/AndroidRuntime(257):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
03-30 10:52:52.653: E/AndroidRuntime(257):  at dalvik.system.NativeStart.main(Native Method)
03-30 10:52:52.693: E/dalvikvm(257): Unable to open stack trace file '/data/anr/traces.txt': Permission denied


A: It is because your emaluator is not supporting action bar. Try either of these
1 -  use action bar sherlock instead of action bar. Google it for its implementation. 
2 -  try increasing the android version of emaluator to ICS or more. 
I recommend using action bar sherlock

A: From official documentation, try following it and see if the error is gone.

The ActionBar APIs were first added in Android 3.0 (API level 11) but
  they are also available in the Support Library for compatibility with
  Android 2.1 (API level 7) and above.
This guide focuses on how to use the support library's action bar, but
  if your app supports only Android 3.0 or higher, you should use the
  ActionBar APIs in the framework. Most of the APIs are the same—but
  reside in a different package namespace—with a few exceptions to
  method names or signatures that are noted in the sections below.
Caution: Be certain you import the ActionBar class (and related APIs)
  from the appropriate package:
If supporting API levels lower than 11:
import android.support.v7.app.ActionBar

If supporting only API level 11 and higher:
import android.app.ActionBar


More At: http://developer.android.com/guide/topics/ui/actionbar.html
You can also check http://actionbarsherlock.com/

A: Just tell your emulator to support the same API level as your device and the problem should magically vanish. It's a configuration setting in the emulator.
