Android error: cannot find symbol class ActionBarActivity
ActionBarActivity
was deprecated below API level 25. Instead use AppCompatActivity
In your build.gradle
add following line under dependencies
block:
compile 'com.android.support:appcompat-v7:21.0.+'
Also make sure to have compileSdkVersion and targetSdkVersion set to 21 under android
block.
Then Sync your project. If autoimport
is disabled - add this import:
import android.support.v7.app.ActionBarActivity;
Also update Android Studio and gradle plugin to the latest version.
You need to add the following import to your activity:
import android.support.v7.app.ActionBarActivity;
for this to work you require the support library. Take a look at thisLink