error: inner element must either be a resource reference or empty.

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/NCTU_to_prove_safety/article/details/87281491

FAQ:

Android resource compilation failed
Output: /home/cmm/code/AndroidHttpCapture/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:733: error: <item> inner element must either be a resource reference or empty.

Command: /home/cmm/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.0-4818971-linux.jar/8e0275d065e63c2601af4fb5800833ab/aapt2-3.2.0-4818971-linux/aapt2 compile --legacy \
-o \
/home/cmm/code/AndroidHttpCapture/app/build/intermediates/res/merged/debug \
/home/cmm/code/AndroidHttpCapture/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml
Daemon: AAPT2 aapt2-3.2.0-4818971-linux Daemon #1

 

如上错误原来是values.xm资源文件中,元素定义了id后,就不能在后面给值了

 

发现 

<item name="split" type="id">false</item>

改为

<item name="split" type="id"/>

即可.

 

ref:

https://stackoverflow.com/questions/52076491/android-inner-element-must-either-be-a-resource-reference-or-empty

https://my.oschina.net/zouningujs/blog/2251795

展开阅读全文

没有更多推荐了,返回首页