zoukankan      html  css  js  c++  java
  • error: <item> inner element must either be a resource reference or empty.

    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

  • 相关阅读:
    android.animation(6)
    android.animation(5)
    android.animation(4)
    android.animation(3)
    android.animation(2)
    android.animation(1)
    android.view.animation(2)
    php热身2:CRUD with Ajax
    PHP热身
    Android热身:通过网络获取资源并更新UI组件
  • 原文地址:https://www.cnblogs.com/bluestorm/p/10333872.html
Copyright © 2011-2022 走看看