AAPT2 资源失败错误

AAPT2 failed resources error

问题不知从何而来。我早上刚刚开始这个项目,并将 Android Studio 更新到 3.1.4。 gradle 构建时出现错误:

Output:  C:\Users\Admin\Documents\AndroidStudioProjects\Barnaul\comfort_uk\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2420: error: resource drawable/rounded_btn_green (aka sys_rom.ru.comfort_uk_app:drawable/rounded_btn_green) not found.
C:\Users\Admin\Documents\AndroidStudioProjects\Barnaul\comfort_uk\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2425: error: resource drawable/rounded_btn_red (aka sys_rom.ru.comfort_uk_app:drawable/rounded_btn_red) not found.

还有更多:

Command: C:\Users\Public\.gradle\caches\transforms-1\files-1.1\aapt2-3.3.0-alpha04-4818971-windows.jarf5a29e7c2942acb56467bc777e4710\aapt2-3.3.0-alpha04-4818971-windows\aapt2.exe link -I\
    C:\Users\Admin\AppData\Local\Android\Sdk\platforms\android-27\android.jar\
    --manifest\
    C:\Users\Admin\Documents\AndroidStudioProjects\Barnaul\comfort_uk\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml\
    -o\
    C:\Users\Admin\Documents\AndroidStudioProjects\Barnaul\comfort_uk\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
    -R\
    @C:\Users\Admin\Documents\AndroidStudioProjects\Barnaul\comfort_uk\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
    --auto-add-overlay\
    --java\
    C:\Users\Admin\Documents\AndroidStudioProjects\Barnaul\comfort_uk\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
    --custom-package\
    sys_rom.ru.comfort_uk_app\
    -0\
    apk\
    --output-text-symbols\
    C:\Users\Admin\Documents\AndroidStudioProjects\Barnaul\comfort_uk\app\build\intermediates\symbols\debug\R.txt\
    --no-version-vectors
Daemon:  AAPT2 aapt2-3.3.0-alpha04-4818971-windows Daemon #0

我尝试过的:

配置文件:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0-alpha04'
        classpath 'com.google.gms:google-services:3.0.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

应用的配置:

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'

    defaultConfig {
        applicationId "sys_rom.ru.comfort_uk_app"
        minSdkVersion 14
        targetSdkVersion 27
        versionCode 9
        versionName "1"

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

    useLibrary 'org.apache.http.legacy'

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation "com.android.support:recyclerview-v7:27.1.1"
    implementation 'com.google.firebase:firebase-core:10.0.1'
    implementation 'com.google.firebase:firebase-messaging:10.0.1'
    implementation 'com.google.firebase:firebase-auth:10.0.1'
    implementation "com.squareup.picasso:picasso:2.5.0"

    implementation 'com.makeramen:roundedimageview:2.3.0'
}

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

问题是我将这个字符串 <?xml version="1.0" encoding="utf-8"?> 放在我的一个新绘图的头部两次。