java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.actionbarlower/com.example.actionbarlower.MainActivity}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2295) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349) at android.app.ActivityThread.access$700(ActivityThread.java:159) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5419) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1209) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1025) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at android.support.v7.app.ActionBarImplICS.setDisplayShowHomeEnabled(ActionBarImplICS.java:169) at android.support.v7.app.ActionBarImplJB.setDisplayShowHomeEnabled(ActionBarImplJB.java:20) at com.example.actionbarlower.MainActivity.onCreate(MainActivity.java:20) at android.app.Activity.performCreate(Activity.java:5372) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257) ... 11 more
代码如下: public class MainActivity extends ActionBarActivity {