Reputation: 1248
When i create a new activity it automatically extends ActionBarActivity which is deprecated. The question is , Do i do something with it? or just leave it alone?
i tried to replace the ActionBarActivity with AppCompatActivity but it gives me errors in the rest of the class.
Thanks.
Upvotes: 0
Views: 275
Reputation: 1007296
Do i do something with it? or just leave it alone?
Either is fine. If you wish to get rid of the deprecation warning, replace ActionBarActivity
with AppCompatActivity
. Hopefully, the new-activity templates will be fixed in an upcoming release of Android Studio.
i tried to replace the ActionBarActivity with AppCompatActivity but it gives me errors in the rest of the class.
Make sure that you add the import
statement to import AppCompatActivity
. This directory contains several sample projects that use appcompat-v7
and AppCompatActivity
.
Beyond that, consider asking a separate Stack Overflow question, where you provide your code and list the errors.
Upvotes: 1