Android Studio"无法解析符号'主题'"

Cin*_*kyn 9 android android-actionbar android-studio

当我扩展时@style/Theme.AppCompat.Light,我正在使用android studio 0.8.4 ,android studio can't resolove symbol 'Theme'用红色字体着色Theme.但是当我运行这个项目时,它运行良好.我不知道如何解决这个问题.以下是我的代码.

styles.xml

<resources>
    <!-- the theme applied to the application or activity -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    </style>
</resources>
Run Code Online (Sandbox Code Playgroud)

的build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 20
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "kr.co.hiworks.office"
        minSdkVersion 9
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    lintOptions {
        disable 'InvalidPackage'
    }

    packagingOptions {
        exclude 'META-INF/services/javax.annotation.processing.Processor'
    }

}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v4:19.+'
    compile 'com.android.support:appcompat-v7:19.+'
    compile 'com.jakewharton:butterknife:5.1.1'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.mcxiaoke.volley:library:1.0.6'
    compile 'com.github.satyan:sugar:1.3'
}
Run Code Online (Sandbox Code Playgroud)

AndroidManifest.xml中

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="kr.co.hiworks.office" >

    <application
        android:name=".BaseApplication"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <meta-data android:name="DATABASE" android:value="hiworks_office.db" />
        <meta-data android:name="VERSION" android:value="1" />
        <meta-data android:name="QUERY_LOG" android:value="true" />
        <meta-data android:name="DOMAIN_PACKAGE_NAME" android:value="kr.hiworks.office.models" />
        <activity
            android:name=".activities.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>
Run Code Online (Sandbox Code Playgroud)

Cin*_*kyn 4

https://code.google.com/p/android/issues/detail?id=64649

这个错误是因为 gradle 0.12.2 所以我将 gradle 版本从 更改为0.12.+0.12.1它运行良好。