SimplicityApks / ReminderDatePicker

A Google Keep-like Date and Time Picker for reminders
Apache License 2.0
74 stars 26 forks source link

API 28 issue - <item> inner element must either be a resource #40

Open chrisonline opened 6 years ago

chrisonline commented 6 years ago

If I compile with API 28 I get the following error:

inner element must either be a resource reference or empty This error is refering to the includes "datetimepicker" library. In this library there are lot defined items in values.xml like: ` false
<item name="cancel_button" 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_back" type="id">false</item>

`

The problem is here that an tag item can't have a type and a value. With API 28 you can't compile it anymore.

Seems the library who causes the problem is: compile 'com.github.lachlanm:datetimepicker:0.0.5'

Seen in you build.gradle. Can you have a look at it?

SimplicityApks commented 5 years ago

Well this seems to be a problem even in the Datepicker library, but it is also in jaydp17's datetimepicker. You might want to open an issue there. Sorry it took me so long to answer, I'm not really that active on Github any more.

Looking at it, I might need to update the datetimepicker library anyway, but I don't think it will solve your problem right now.

SimplicityApks commented 5 years ago

Just found this issue on flavienlaurent's datetimepicker. Is the exact same problem ;)

chrisonline commented 5 years ago

I see. Thanks for the info. But let's hope that he PR get's merged from him because the last change of this libray was 5 years ago.

chrisonline commented 5 years ago

Everyone can fix it by yoursel 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.

chrisonline commented 5 years ago

@SimplicityApks I have now fixed the problem with datetimepicker of flavienlaurent. Also I fixed the problem with API28 you get if you want to compile it against (canvas.save was removed).

Can you add my library with fixes instead the current one you have in the build.gradle: implementation 'com.colapps:datetimepicker-library:0.0.7'

Afterwards all should work again an also on API28.

SimplicityApks commented 5 years ago

ok will do when I find the time ;) thanks for forking!