Search code examples
androidandroid-custom-viewretrolambda

Error:Execution failed for task ':app:processStagingDebugResources'


I'm currently working on custom view and have the next issue. I've created custom attributes and in case if I don't use enum everything is okay.

<declare-styleable name="GCSettingsItem">
    <attr name="gc_settings_item_type">
        <enum name="none" value="0" />
        <enum name="arrow" value="1" />
        <enum name="check" value="2" />
        <enum name="switch" value="3" />
    </attr>
    <attr name="gc_settings_item_text" format="string"/>
</declare-styleable>

But as soon as I add attribute with enum I get the next error:

Error:Execution failed for task ':app:processStagingDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/volodiachorneknyy/Library/Android/sdk/build-tools/23.0.3/aapt'' finished with non-zero exit value 1

What may be the reason for such issue?

UPDATE 1 I use retrolambda. I tried to do the same without it and everything is okay.


Solution

  • After few hours of trying, I found the solution. Looks like enum attributes can't have the same name as java keywords. So right after I change switch to different word everything work good. Also, I tested it with class, enum, and other java keywords.