ActionBarActivity is deprecated

113,400

Solution 1

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

Read here and here for more information.

Solution 2

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

enter image description here

Solution 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)

Share:
113,400
Admin
Author by

Admin

Updated on May 02, 2020

Comments

  • Admin
    Admin about 4 years

    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?

  • dm78
    dm78 almost 9 years
    Other changes may be necessary as outlined in that video. The two changes shown here are merely the most basic changes. It is also important to include the proper dependency for existing projects -- as outlined in that video.
  • victor n.
    victor n. almost 9 years
    they could have updated the activity templates. sigh...
  • Josh
    Josh almost 9 years
    Now 1,000,000 will waste 5 minutes fixing this because somebody at google did not update the template. That´s 5 million minutes lost, to be conservative.
  • Gaëtan
    Gaëtan almost 9 years
    The template was updated in Android Studio 1.3-dev
  • Neon Warge
    Neon Warge over 8 years
    Because google you know