Amrit
Amrit

Reputation: 23

cannot resolve symbol actionbaractivity

Trying it for a long time but cannot get to solve it. I have android build tools and support repository installed as well

build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "24.0.1"

defaultConfig {
    applicationId "com.example.amrit.myapplication"
    minSdkVersion 8
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled true
        proguardFile 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.1.1'
}

.java

package com.example.amrit.myapplication;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class Game extends ActionBarActivity {

Upvotes: 0

Views: 2339

Answers (1)

Sergio
Sergio

Reputation: 8209

ActionBarActivity is deprecated for a long time. And your import statement suggests to use AppCompatActivity instead:

public class Game extends AppCompatActivity {

Upvotes: 9

Related Questions