user1727257 user1727257 - 4 months ago 17
Android Question

android.support.v7.app.ActionBarActivity is deprecated

android.support.v7.app.ActionBarActivity is deprecated, what does this mean and how do i solve ths issue. I am new to coding.

Also
public class MainActivity extends ActionBarActivity. the word "ActionBarActivity" has a line across the word , why is this ?

Regards

CC

Answer

Use

android.support.v7.app.AppCompatActivity

instead of

android.support.v7.app.ActionBarActivity (DEPRECATED)

and extends AppCompatActivity

    public myClass extends AppCompatActivity{
...
...

if you have the message:

cannot resolve symbol AppCompatActivity

You have to update to the last support library in your Android SDK Manager