无法解析符号 actionbaractivity

cannot resolve symbol actionbaractivity

试了半天没解决。我还安装了 android 构建工具和支持存储库

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 {

ActionBarActivity 已被弃用很长时间。您的导入语句建议改用 AppCompatActivity

public class Game extends AppCompatActivity {