Im porting an existing app to gradle build system and got the following error while doing a build from command line
error: No resource identifier found for attribute 'ignore_vertical_scroll' in package 'com.example.dummyapp'
Now 'ignore_vertical_scroll'
is a custom attribute defined in attrs.xml
using it as abc:ignore_vertical_scroll="true"
in the layout where xmlns:abc="http://schemas.android.com/apk/res-auto"
What I have read till now is that this URI was added in ADT 17.0 to mitigate package name issues in custom components. Not sure how this translates in gradle.
Found the problem.
I had defined these attributes in the attrs.xml in the following format
<declare-styleable name="HorizontalPager">
<attr name="ignore_vertical_scroll" format="boolean" />
<attr name="page_width_proportion" format="integer" />
</declare-styleable>
<declare-styleable name="HorizontalPager">
<attr name="off_screen_page_limit" format="integer" />
</declare-styleable>
Both the styles had the same name and now during compilation the second attribute definition was overriding the first attribute definition because of which aapt was not able to find the said attributes. Combining these two definitions into a single one fixed the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With