缺少风格。是否为此布局选择了正确的主题,(无法解析AppCombatActivity)

时间:2016-08-02 11:25:40

标签: java android android-appcompat main-activity

我需要帮助,因为我构建了这个项目(来自android初学者的udacity课程) 它还可以,但是当我清理并重新打开它时会显示与我使用的主题相关的错误。请任何帮助将不胜感激。

enter image description here

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.1"

    defaultConfig {
        applicationId "com.example.android.scorekeeper"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

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

1 个答案:

答案 0 :(得分:0)

app/build.gradle文件

中找到以下行
compile 'com.android.support:appcompat-v7:23.3.0' // ensure this line is present
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:recyclerview-v7:23.1.1'