ActionBarActivity is deprecated [duplicate]

2019-01-02 22:20发布

This question already has an answer here:

Actually there is no problem. Project compiles and runs. But I can't understand what is mean strikeout class name (Android Studio tells that there is deprecated code is used)enter image description here. Can anybody explain?

3条回答
我欲成王,谁敢阻挡
2楼-- · 2019-01-02 22:42

According to this video of Android Developers you should only make two changes

enter image description here

查看更多
啃猪蹄的小仙女
3楼-- · 2019-01-02 22:50

Since the version 22.1.0, the class ActionBarActivity is deprecated. You should use AppCompatActivity.

Read here and here for more information.

查看更多
霸刀☆藐视天下
4楼-- · 2019-01-02 23:01

android developers documentation says : "Updated the AppCompatActivity as the base class for activities that use the support library action bar features. This class replaces the deprecated ActionBarActivity."

checkout changes for Android Support Library, revision 22.1.0 (April 2015)

查看更多
登录 后发表回答