0

Android Studio had been working fine. But then I tried to add

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

I then got this error everytime I clean or build:

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.

So I tried removing it, but I still get the same error! I've been trying to fix it for hours but nothing I tried seems to work.

  1. I tried the Make option in the Build menu
  2. I have already tried File > Invalidate Caches / Restart
  3. I tried changing the buildToolsVersion to lower versions
  4. I tried changing the appcompat-v7 import in gradle to lower versions
  5. I tried putting multiDexEnabled true

Here is my current gradle file:

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

I'll say it again, this is how it looked like before I added the support design library and it was working fine then.

John Ernest Guadalupe
  • 6,379
  • 11
  • 38
  • 71
  • 2
    I think there is more to the error that you aren't showing. The exception is above those lines in the Gradle build – OneCricketeer Apr 02 '16 at 15:37
  • I think I don't understand what you mean. What other situations does this error occur in? – John Ernest Guadalupe Apr 02 '16 at 15:38
  • 1
    [http://stackoverflow.com/questions/35618098/android-support-libraries-23-2-0-cause-app-to-crash](http://stackoverflow.com/questions/35618098/android-support-libraries-23-2-0-cause-app-to-crash) – M D Apr 02 '16 at 15:39
  • 1
    Try running `lint` from the Gradle options and see if there are errors. `app:processDebugResources` is trying to compile resources like your XML views that lint will catch any misconfigured files – OneCricketeer Apr 02 '16 at 15:40
  • 3
    "I then got this error everytime I clean or build" -- please edit your question and post the **entire** Gradle console output, not just these lines. Your problem, as cricket_007 points out, appears higher in the Gradle console output. – CommonsWare Apr 02 '16 at 15:41
  • Try to add `android { ... aaptOptions { additionalParameters "--no-version-vectors" } ... }` in your gradle. It may helps you. – pRaNaY Apr 03 '16 at 11:30

1 Answers1

1

Embaraasing. Thanks for your tips @cricket_007 and @CommonsWare. I tried removing the resources I added and removed the changes I have also made. It turns out I have this attribute enum in the attrs.xml file having the name of true and ` false.

<attr name=[attribute name]>
    <enum name="true" value="1"/>
    <enum name="false" value="2"/>
</attr>

Once I removed that everything became okay. Seems like I can't use certain words as the name. Curiously though, lint DID NOT notify me of this at any time I as editing and re-editing the file.

Nevertheless, thank you for your help!

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
John Ernest Guadalupe
  • 6,379
  • 11
  • 38
  • 71
  • 1
    Welcome. If running the Gradle `lint` process pointed you to that problem, could you include the steps you took to find it? That might help others see similar problems – OneCricketeer Apr 02 '16 at 15:56