无法解析符号主题,Themeoverlay和小部件Appcompat

时间:2018-04-12 01:21:25

标签: java android android-gradle

之前一切都很好,但现在当我重新打开我的Android项目时,在样式的values文件夹中,大多数父级都以红色突出显示。我不明白为什么以及如何解决它。当我编译项目它工作正常但我只是想删除错误。以下是错误文件

这是图像文件:

Here is the image file

我的应用构建文件是

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    useLibrary 'org.apache.http.legacy'
    buildToolsVersion "26.0.0"
    defaultConfig {
        applicationId "com.nepalpolice.cdp"
        minSdkVersion 15
        multiDexEnabled true
        targetSdkVersion 26
        versionCode 15
        versionName "15.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        lintOptions {
            checkReleaseBuilds false
            abortOnError false
        }

        packagingOptions {
            exclude 'META-INF/DEPENDENCIES'
            exclude 'META-INF/LICENSE'
            exclude 'META-INF/LICENSE.txt'
            exclude 'META-INF/license.txt'
            exclude 'META-INF/NOTICE'
            exclude 'META-INF/project.properties'
            exclude 'META-INF/NOTICE.txt'
            exclude 'META-INF/notice.txt'
            exclude 'META-INF/ASL2.0'
            exclude 'allclasses-frame.html'
        }

    }
    dexOptions {
        jumboMode true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}





dependencies {
    implementation 'com.google.firebase:firebase-auth:11.4.2'
    implementation 'com.google.firebase:firebase-storage:11.4.2'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation("com.github.bumptech.glide:glide:4.6.1") {
        exclude group: "com.android.support"
    }
    compile 'com.github.bumptech.glide:glide:4.6.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
    implementation 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support:design:26.+'
    implementation 'com.android.support:support-v4:26.+'
    implementation 'com.android.support:cardview-v7:26.+'
    implementation 'com.android.support:recyclerview-v7:26.+'
    implementation 'com.google.firebase:firebase-messaging:11.4.2'
    compile 'com.google.firebase:firebase-database:11.4.2'
    compile 'com.google.firebase:firebase-core:11.4.2'
    implementation 'com.google.gms:google-services:3.1.0'
    implementation 'com.android.support:design:26.+'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    compile 'com.android.support:multidex:1.0.1'
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.5.1'
    implementation 'com.android.support:gridlayout-v7:26.+'
    implementation 'com.github.clans:fab:1.6.2'
    testCompile 'junit:junit:4.12'
    implementation 'com.google.android.gms:play-services-maps:11.4.2'
    implementation 'com.google.firebase:firebase-firestore:11.4.2'
    implementation 'id.zelory:compressor:2.1.0'
    compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.12'
    implementation files('libs/libGoogleAnalyticsServices.jar')

    apply plugin: 'com.google.gms.google-services'
}

我的构建gradle文件是

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    useLibrary 'org.apache.http.legacy'
    buildToolsVersion "26.0.0"
    defaultConfig {
        applicationId "com.nepalpolice.cdp"
        minSdkVersion 15
        multiDexEnabled true
        targetSdkVersion 26
        versionCode 15
        versionName "15.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        lintOptions {
            checkReleaseBuilds false
            abortOnError false
        }

        packagingOptions {
            exclude 'META-INF/DEPENDENCIES'
            exclude 'META-INF/LICENSE'
            exclude 'META-INF/LICENSE.txt'
            exclude 'META-INF/license.txt'
            exclude 'META-INF/NOTICE'
            exclude 'META-INF/project.properties'
            exclude 'META-INF/NOTICE.txt'
            exclude 'META-INF/notice.txt'
            exclude 'META-INF/ASL2.0'
            exclude 'allclasses-frame.html'
        }

    }
    dexOptions {
        jumboMode true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}





dependencies {
    implementation 'com.google.firebase:firebase-auth:11.4.2'
    implementation 'com.google.firebase:firebase-storage:11.4.2'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation("com.github.bumptech.glide:glide:4.6.1") {
        exclude group: "com.android.support"
    }
    compile 'com.github.bumptech.glide:glide:4.6.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
    implementation 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support:design:26.+'
    implementation 'com.android.support:support-v4:26.+'
    implementation 'com.android.support:cardview-v7:26.+'
    implementation 'com.android.support:recyclerview-v7:26.+'
    implementation 'com.google.firebase:firebase-messaging:11.4.2'
    compile 'com.google.firebase:firebase-database:11.4.2'
    compile 'com.google.firebase:firebase-core:11.4.2'
    implementation 'com.google.gms:google-services:3.1.0'
    implementation 'com.android.support:design:26.+'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    compile 'com.android.support:multidex:1.0.1'
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.5.1'
    implementation 'com.android.support:gridlayout-v7:26.+'
    implementation 'com.github.clans:fab:1.6.2'
    testCompile 'junit:junit:4.12'
    implementation 'com.google.android.gms:play-services-maps:11.4.2'
    implementation 'com.google.firebase:firebase-firestore:11.4.2'
    implementation 'id.zelory:compressor:2.1.0'
    compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.12'
    implementation files('libs/libGoogleAnalyticsServices.jar')

    apply plugin: 'com.google.gms.google-services'
}

我试图清理并运行项目,但仍然没有修复问题。

1 个答案:

答案 0 :(得分:1)

我遇到了同样的问题。 也许this帖子也有相同的根源 无论如何只有两个步骤帮助了我:

1.从“文件”菜单中关闭项目 2.再次打开项目作为现有的Android Studio项目。