Issue
Recently I've upgraded my project to Android Studio 3.2.1, Gradel 4.6, Gradle Plugin 4.6 and tagetSDKVersion 28.
However I'm getting below error in the merged values.xml file -
error: <item> inner element must either be a resource reference or empty.
Lines from the merged values.xml which are causing the issues -
<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>
<item name="month_text_view" type="id">false</item>
<item name="animator" type="id">false</item>
Exact error log
Android resource compilation failed
Output: C:\AmrutData\Workspace\Q4\Mobile-Quitters-Circle-Android\app\build\intermediates\incremental\mergeStageDebugResources\merged.dir\values\values.xml:6866: error: <item> inner element must either be a resource reference or empty.
C:\AmrutData\Workspace\Q4\Mobile-Quitters-Circle-Android\app\build\intermediates\incremental\mergeStageDebugResources\merged.dir\values\values.xml:6881: error: <item> inner element must either be a resource reference or empty.
C:\AmrutData\Workspace\Q4\Mobile-Quitters-Circle-Android\app\build\intermediates\incremental\mergeStageDebugResources\merged.dir\values\values.xml:6882: error: <item> inner element must either be a resource reference or empty.
C:\AmrutData\Workspace\Q4\Mobile-Quitters-Circle-Android\app\build\intermediates\incremental\mergeStageDebugResources\merged.dir\values\values.xml:6883: error: <item> inner element must either be a resource reference or empty.
C:\AmrutData\Workspace\Q4\Mobile-Quitters-Circle-Android\app\build\intermediates\incremental\mergeStageDebugResources\merged.dir\values\values.xml:6884: error: <item> inner element must either be a resource reference or empty.
C:\AmrutData\Workspace\Q4\Mobile-Quitters-Circle-Android\app\build\intermediates\incremental\mergeStageDebugResources\merged.dir\values\values.xml:6885: error: <item> inner element must either be a resource reference or empty.
C:\AmrutData\Workspace\Q4\Mobile-Quitters-Circle-Android\app\build\intermediates\incremental\mergeStageDebugResources\merged.dir\values\values.xml:6886: error: <item> inner element must either be a resource reference or empty.
C:\AmrutData\Workspace\Q4\Mobile-Quitters-Circle-Android\app\build\intermediates\incremental\mergeStageDebugResources\merged.dir\values\values.xml:6887: error: <item> inner element must either be a resource reference or empty.
C:\AmrutData\Workspace\Q4\Mobile-Quitters-Circle-Android\app\build\intermediates\incremental\mergeStageDebugResources\merged.dir\values\values.xml:6896: error: <item> inner element must either be a resource reference or empty.
C:\AmrutData\Workspace\Q4\Mobile-Quitters-Circle-Android\app\build\intermediates\incremental\mergeStageDebugResources\merged.dir\values\values.xml:7419: warn: ignoring element 'g' with unknown namespace 'http://schemas.android.com/apk/res/android'.
Command: C:\Users\1258503\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\074ce88e9379d4536b62c1cf1690927a\aapt2-3.2.1-4818971-windows\aapt2.exe compile --legacy \
-o \
C:\AmrutData\Workspace\Q4\Mobile-Quitters-Circle-Android\app\build\intermediates\res\merged\stage\debug \
C:\AmrutData\Workspace\Q4\Mobile-Quitters-Circle-Android\app\build\intermediates\incremental\mergeStageDebugResources\merged.dir\values\values.xml
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
I know for sure that these are not from my values and most of them are from the class com.android.datetimepicker.date.DatePickerDialog
and I'm not getting how to fix this as these are from the library and not from my project.
Solution
After lot of search I found that it was one of my library which was causing this issue. The library I was using was not compatible with gradle 3.2.1 and which was causing the issues in compilation.
Answered By - Amrut
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.