ActionBarActivity is deprecated [duplicate]

折月煮酒 提交于 2019-12-17 01:39:11

问题


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)

. Can anybody explain?

回答1:


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

Read here and here for more information.




回答2:


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




回答3:


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)



来源:https://stackoverflow.com/questions/29890530/actionbaractivity-is-deprecated

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!