AAPT2 resource reference issue
dorozhans opened this issue · 4 comments
Hi. I've updated build tools to 28.0.0 version and gradle to latest version in my project and now I have an issue with building. Output:
Android resource compilation failed
Output: /Users/sergeydorozhan_local/testproject/app/build/intermediates/incremental/mergeStageResources/merged.dir/values/values.xml:3193: error: <item> inner element must either be a resource reference or empty.
/Users/sergeydorozhan_local/testproject/app/build/intermediates/incremental/mergeStageResources/merged.dir/values/values.xml:3195: error: <item> inner element must either be a resource reference or empty.
I've opened file values.xml and found values which are not corrected:
<item name="date_picker_day" type="id">false</item>
<item name="date_picker_header" type="id">false</item>
<item name="date_picker_month" type="id">false</item>
<item name="date_picker_month_and_day" type="id">false</item>
<item name="date_picker_year" type="id">false</item>
<item name="day_picker_selected_date_layout" type="id">false</item>
<item name="done" type="id">false</item>
All the other items with id type have another structure like:
<item name="ghost_view" type="id"/>
<item name="home" type="id"/>
Could you fix it? Or help me with this issue?
Looks like #136 will resolve these issues. @flavienlaurent any chance of getting this PR looked at soon? Thanks!
@flavienlaurent Any update on this?
You can fix it by yourself in the meantime with this workaround.
Add following "items" to your local apps ids.xml:
<item name="animator" type="id" />
<item name="cancel_button" type="id"/>
<item name="date_picker_month_and_day" type="id"/>
<item name="date_picker_year" type="id"/>
<item name="day_picker_back" type="id"/>
<item name="day_picker_forward" type="id"/>
<item name="day_picker_pager" type="id"/>
<item name="day_picker_selected_date_layout" type="id"/>
<item name="done_button" type="id"/>
<item name="month_text_view" type="id"/>
Afterwards it will compile again because it overrides the library ones.
Also you can use now my version:
https://github.com/chrisonline/datetimepicker
Changes:
- Updated to API28
- Updated BuildTools to newest version
- Fixed problem with API28 and canvas.save(int) mehtod (was removed in API28)
- Fixed AAPT2 resource reference issue (see issue here #135)
implement 'com.colapps:datetimepicker-library:0.0.7'