更新时间:2023-11-19 12:30:04
您是从 ActionBarActivity
继承。因此,你需要使用 getSupportActionBar()
,不是 getActionBar()
,以获得在 appcompat-V7
-supplied行动吧反向移植。
You are inheriting from ActionBarActivity
. Hence, you need to use getSupportActionBar()
, not getActionBar()
, to get at the appcompat-v7
-supplied action bar backport.