android - 资源属性/? Android Studio更新后找不到

标签 android gradle

所以我的项目在当前的Android Studio更新之前运行良好,现在出现以下错误:

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'
}

问题似乎出在哪里?
谢谢!

最佳答案

打开gradle.properties并添加以下内容:

android.enableAapt2=false

关于android - 资源属性/? Android Studio更新后找不到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46941156/

相关文章:

android - 具有完全透明状态栏的 DrawerLayout

android - 在 Lollipop 前设备的工具栏上添加高程/阴影

Android Studio 3.1,没有可用于离线模式的缓存版本

Android:为什么在 Activity onCreate 上将静态变量设置为 null

android - 项目刷新失败,无法打开 zip 文件

android - 离线尊重应用内购买 + 删除取消的购买

maven - 无法解析Gradle中的jar依赖项

android - 类型 BuildConfig 被定义多次

android - 无法发布 Artifact 'xxx.aar' (xxx.aar),因为它不存在

java - Log4j2 + MongoDb不起作用