EDIT我忘记了一大块代码。在此处插入。@OverridepublicbooleanonOptionsItemSelected(MenuItemitem){Log.w("Beforeswitch",(String)item.getTitle());switch(item.getItemId()){caseR.id.menu_settings:Log.w("Beforeintent","\n");Intentintent=newIntent(this,SettingsActivity.class);startActivity(intent);Log.w("backfromintent",