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
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)
Author by
Admin
Updated on May 02, 2020Comments
-
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). Can anybody explain?
-
dm78 almost 9 yearsOther 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. almost 9 yearsthey could have updated the activity templates. sigh...
-
Josh almost 9 yearsNow 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 almost 9 yearsThe template was updated in Android Studio 1.3-dev
-
Neon Warge over 8 yearsBecause google you know