关于: AAPT: error: not well-formed (invalid token).

今天遇到一个报错问题,是关于xml文件的报错

关于: AAPT: error: not well-formed (invalid token).

如图所示,是因为在xml文件中的textview的texe属性中包含<所致,也就是说在text=""属性中,一旦包含大于号或者小于号,编译就不会通过,但是这时候androidstudio不会给你红色的波浪线提示你错误,这时候就是看自己的开发经验的时候了。

解决方法如下:

把text=""里面的非法字符删除即可,如果你是在是要用的话,建议使用icon图片进行删除按钮的背景

传送一个icon地址http://www.iconfont.cn/   阿里巴巴矢量库

我的效果如下

关于: AAPT: error: not well-formed (invalid token).