为什么我会得到一个应用程序:processDebugResources'尝试添加支持设计库后出错?

时间:2016-04-02 15:34:32

标签: android android-gradle build.gradle

Android Studio一直很好用。但后来我尝试添加

compile 'com.android.support:design:23.2.1'

每次清理或构建时,我都会收到此错误:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Android\android-sdks\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

所以我尝试删除它,但我仍然得到同样的错误!我一直试图修复它几个小时,但我尝试的任何东西似乎都没有用。

  1. 我在Build菜单中尝试了Make选项
  2. 我已经尝试过File>使缓存无效/重新启动
  3. 我尝试将buildToolsVersion更改为较低版本
  4. 我尝试将gradle中的appcompat-v7导入更改为较低版本
  5. 我尝试了multiDexEnabled true
  6. 这是我当前的gradle文件:

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.3"
    
        defaultConfig {
            applicationId [package]
            minSdkVersion 15
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:23.2.1'
        compile 'com.jakewharton:butterknife:7.0.1'
        compile 'com.jakewharton.timber:timber:3.1.0'
        compile 'com.github.bumptech.glide:glide:3.6.1'
        compile 'com.nononsenseapps:filepicker:2.5.0'
        compile 'com.google.code.gson:gson:2.6.2'
        compile 'com.squareup.retrofit2:retrofit:2.0.0'
        compile 'com.squareup.retrofit2:converter-gson:2.0.0'
    }
    

    我再说一遍,这是我添加支持设计库之前的样子,然后工作正常。

1 个答案:

答案 0 :(得分:1)

Embaraasing。感谢您的提示@ cricket_007和@CommonsWare。我尝试删除我添加的资源并删除了我所做的更改。事实证明我在myfunc(float x)文件中有这个属性枚举,其名称为attrs.xml和'false。

true

一旦我删除,一切都变好了。好像我不能用某些单词作为名字。奇怪的是,lint DID在我编辑和重新编辑文件的任何时候都不会通知我。

尽管如此,谢谢你的帮助!

相关问题