Android Studio : All of a sudden cannot resolve symbol 'ActionBarActivity'

308 views Asked by At

I am really new to android programming. I have been using Android Studio 1.2.1.1 for the last couple of weeks and made very simple apps(basically learning). And today I open any project it always shows

cannot resolve symbol 'ActionBarActivity'

I have tried the other solutions offered in other answers here. I did almost all of them. I imported Google Play Services, Google Support Repository, Invalidated caches and restarted.But nothing seems to help. And as expected I am unable to run the app.

Thanks in advance.

2

There are 2 answers

0
varunkr On

ActionBarActivity is deprecated i.e dead. You should instead use AppCompatActivity. See below links for details

https://plus.google.com/+AndroidDevelopers/posts/LNyDnnBYJ8r

ActionBarActivity is deprecated

0
Jorge Casariego On

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

1. AndroidManifest.xml

<application android:theme="@style/**Theme.App.Compact**">

2. Change every Activity with ActionBarActivity like this

public class MainActivity extends AppCompatActivity