资源attr / ??在Android Studio更新后找不到

时间:2017-10-25 20:03:13

标签: android gradle

所以我的项目在当前的Android Studio Update之前工作正常,现在我遇到以下错误:

enter image description here

这是我的Gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion '26.0.2'

    defaultConfig {
        applicationId "com.triple.m.#####"
        minSdkVersion 22
        targetSdkVersion 22

        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
repositories {
    mavenCentral()
    google()
}
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:26.1.0'
    compile 'com.google.firebase:firebase-appindexing:10.2.1'
    compile 'org.slf4j:slf4j-android:1.7.21'
    compile 'org.osmdroid:osmdroid-android:5.6.5'
    testCompile 'junit:junit:4.12'
}

问题似乎是什么? 谢谢!

1 个答案:

答案 0 :(得分:1)

打开gradle.properties并添加:

android.enableAapt2=false