支持库显示构建应用程序时出错

时间:2016-02-21 08:55:30

标签: android android-studio android-support-library android-build

当我尝试构建应用程序时,出现以下错误:

Error:(380, 5) String types not allowed (at 'blue' with value '').

\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.1.1\res\values\values.xml

Error:Execution failed for task ':app:processAllDebugResources'.

com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException: Process 'command
'sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1

build.gradle(module)

apply plugin: 'com.android.model.application'
model {
    android {
        compileSdkVersion  23
        buildToolsVersion "23.0.2"

        defaultConfig.with {
            applicationId "com.ms.sensors"
            minSdkVersion.apiLevel 7
            targetSdkVersion.apiLevel 23
            versionCode 1
            versionName "1.0"
        }

        compileOptions.with {
            sourceCompatibility = JavaVersion.VERSION_1_9
            targetCompatibility = JavaVersion.VERSION_1_9
        }

        buildTypes {
            release {
                minifyEnabled = false
                proguardFiles.add(file('proguard-rules.txt'))
            }
        }
    }

    android.ndk {
        moduleName = "sensorgraph"
        cppFlags.add("-Werror")
        ldLibs.addAll(["log", "GLESv2", "android"])
        stl = "c++_static"
    }

    android.productFlavors {
        create("arm7") {
            ndk.abiFilters.add("armeabi-v7a")
        }
        create("arm8") {
            ndk.abiFilters.add("arm64-v8a")
        }
        create("x86-32") {
            ndk.abiFilters.add("x86")
        }

        create("all")
    }
}
dependencies {
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:support-v4:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.android.support:cardview-v7:23.1.1'
    compile 'com.android.support:recyclerview-v7:23.1.1'
}

build.gradle(project)

buildscript {

        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle-experimental:0.6.0-alpha9'
        }
    }

    allprojects {
        repositories {
            jcenter()
        }
    }

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

使用Android Studio 2.0 Beta 5。 此问题存在于支持库中。如何解决这个问题?

0 个答案:

没有答案