当前位置:网站首页>与元素类型 “item” 相关联的 “name” 属性值不能包含'<” 字符解决办法
与元素类型 “item” 相关联的 “name” 属性值不能包含'<” 字符解决办法
2022-07-28 11:40:00 【yi_tianchou】
Android构建时报错:
app:lintVitalRelease[Fatal Error] :3:214: 与元素类型 “item” 相关联的 “name” 属性值不能包含 ‘<’ 字符。
Could not read /Users/panxin/Library/Android/sdk/platform-tools/api/annotations.zip
java.io.IOException: Could not parse XML from android/accounts/annotations.xml
原因:sdk下/platform-tools/api/annotations.zip这个文件里的xml文件不规范造成的。
annotations.xml 这个文件报错,那么就打开这个文件看一下。
annotations.zip 解压之后得到android,根据报错信息找到报错的文件。
发现:
<item name="android.accounts.AccountManager android.accounts.AccountManagerFuture<android.os.Bundle> addAccount(java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler)">
比如修改后的一段:
<item name="android.accounts.AccountManager android.accounts.AccountManagerFuture<android.os.Bundle> addAccount(java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler)">
<annotation name="androidx.annotation.RequiresPermission">
看到了吧 ,<> 里面带有 <>. 这个在xml里是不允许的。
自己修改:1、用记事本打开报错的文件(看报错信息android/accounts/annotations.xml),并且把标签内的 ‘<’ 和 ‘>’ 字符分别替换成 "<” 和 “>”
2、修改完之后,保证 <>,里没有<>后保存,替换annotations.zip里报错的文件,回到项目再次编译。
边栏推荐
- 用arduino开发ESP8266 搭建开发环境
- After abolishing Tencent cloud: meiyabaike won the bid of 98.3 million
- GMT安装与使用
- Using Arduino to develop esp8266 to build a development environment
- 【vulnhub】Raven2
- Is it difficult for cloud native machine learning to land? Lingqueyun helps enterprises quickly apply mlops
- Unity 安装 Device Simulator
- 【萌新解题】爬楼梯
- 易观分析:以用户为中心提升手机银行用户体验,助力用户价值增长
- 用C语言开发NES游戏(CC65)08、背景 碰撞
猜你喜欢

Implementation method of mouse hover, click and double click in ue4/5

华为发布HarmonyOS 3及全场景新品,智慧体验更进一步

Basic use of JSON server

arduino pro mini ATMEGA328P 连线和点亮第一盏LED(同时记录烧录失败的问题stk500_recv)

用C语言开发NES游戏(CC65)10、游戏循环

First in the country! The two standards of "data product registration" formulated by insight technology and Shandong data were officially released

揭秘界面控件DevExpress WinForms为何弃用受关注的MaskBox属性

GMT installation and use

leetcode:704二分查找

微创电生理通过注册:年营收1.9亿 微创批量生产上市企业
随机推荐
SQL injection less23 (filter comment)
Some API interfaces purchased by Yiwu hope to bring you some help
sqli-labs(less-8)
【一知半解】零值拷贝
Is it overtime to be on duty? Take up legal weapons to protect your legitimate rights and interests. It's time to rectify the working environment
GMT安装与使用
Introduction to resttemplate
Developing NES game (cc65) 03 and VRAM buffer with C language
西门子对接Leuze BPS_304i 笔记
Let Arduino support nuvotom Xintang
Basic use of JSON server
Why do enterprises need the ability of enterprise knowledge management?
Fastjson parses multi-level JSON strings
Ten prohibitions for men and women in love
用C语言开发NES游戏(CC65)07、控制器
[half understood] zero value copy
用C语言开发NES游戏(CC65)08、背景 碰撞
Developing NES games with C language (cc65) 04. Complete background
腾讯二面:@Bean 与 @Component 用在同一个类上,会怎么样?
Solve the PHP prompt warning: division by zero in error