Android 资源编译失败为什么会显示这个

时间:2021-05-15 07:42:01

标签: java android

这里是 .xml 文件这里的错误是什么...

  --U calc ((- 38 * (R) -  74 * (G) + 112 * (B) + 128) >> 8) + 128)
  u_red_reg_op1 <= -38 * red_reg; -- 16 bit signed
  u_green_reg_op1 <= -74 * green_reg; -- 16 bit signed
  u_blue_reg_op1 <= 112 * blue_reg; -- 16 bit signed
  u_reg_op2 <= u_red_reg_op1 + u_green_reg_op1 + u_blue_reg_op1 + 128; -- 16 bit signed
  u_reg_op3 <= unsigned(resize(shift_right(u_reg_op2, 8), 8) + 128); -- 8 bit unsigned
<块引用>

之后,它显示我 Android 资源编译失败...和 AAPT:错误:格式不正确(令牌无效)

1 个答案:

答案 0 :(得分:1)

您没有使用 /> 正确关闭标签, 你的 xml 代码应该在线性布局下面

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:paddingLeft="16dp"
    android:paddingRight="16dp"
    tools:ignore="MissingConstraints">



    <EditText
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:hint="Subject"/>

    <EditText
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:gravity="top"
        android:hint="Message"/>
    <Button
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:gravity="right"
        android:text="send"/>

</LinearLayout>
相关问题