解决问题 inner element must either be a resource reference or empty.
-Q: 错误<item>内部元素必须是资源引用或空
升级Andriod Studio之后编译发现如下错误
Android resource compilation failed
***\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:442:
error: <item> inner element must either be a resource reference or empty.
Android资源编译失败
内部元素必须是资源引用或空
打开报错文件,查看442行发现如下内容
···
<item name="webviewload_monitor_cancel_point" type="id">webviewload_monitor_cancel_point</item>
····
-A(1): 错误<item>内部元素必须是资源引用或空
- 如果是自己的文件
直接找到文件后去掉里面的内容,改为下面这样就对了
<item name="webviewload_monitor_cancel_point" type="id"/>
- 如果不是自己的文件自己没办法去改
临时解决办法是gradle.properties中添加如下配置
android.enableAapt2=false
㊟ :这个方法2018年结束之后随着版本更新就没有办法使用了,编译时提示如下
WARNING: The following project options are deprecated and have been removed:
android.enableAapt2
This property has no effect, AAPT2 is now always used.
顺便呢你就让人家去改去吧(夺命催更๑乛◡乛๑)这中间需要时间就不确定了,现如今已经是2019年了上面的方法已经失效那该怎么办呢?
-A(2):修改第三方文件的错误<item>内部元素必须是资源引用或空
其实呢咱也没必要等着人家去改,咱们可以借助gradle中的resValue这个方法去修改编译中的文件
resValue "id", "webviewload_monitor_cancel_point",""
这样就把之前有问题的内容覆盖掉了。
解决问题 inner element must either be a resource reference or empty.的更多相关文章
- error: <item> inner element must either be a resource reference or empty.
FAQ: Android resource compilation failedOutput: /home/cmm/code/AndroidHttpCapture/app/build/intermed ...
- How do I duplicate a resource reference in code behind in WPF?如何在WPF后台代码中中复制引用的资源?
原文 https://stackoverflow.com/questions/28240528/how-do-i-duplicate-a-resource-reference-in-code-behi ...
- Illegal resource reference: @*android resources are private and not always present
0:前言 在android开发中,当使用别人的代码的时候,在style.xml中有此种错误 1:解决方案 删除*星号
- Android resource compilation failed
报错:Android resource compilation failed D:\android\EasySports\app\build\intermediates\incremental\mer ...
- Layout Resource官方教程(1)简介
Layout Resource SEE ALSO Layouts A layout resource defines the architecture for the UI in an Activit ...
- Drawable(3)Color State List Resource
注意 Color State List Resource 与 Color不同,前者是颜色状态表.根据不同状态显示不同颜色,它是State list,里面有多种颜色,后者只是一个颜色. Color St ...
- Drawable(2)State list Drawable Resource介绍
State List A StateListDrawable is a drawable object defined in XML that uses a several different ima ...
- Learning Puppet — Resource Ordering
Learning Puppet — Resource Ordering Learn about dependencies and refresh events, manage the relation ...
- Android Resource介绍和使用
1. 相关文件夹介绍 文件 取值方式 string.xml getResource().getString(resourceId)或者getResource().getText(resourceId) ...
随机推荐
- centos 添加/删除用户和用户组
centos系统添加/删除用户和用户组 在centos中增加用户使用adduser命令而创建用户组使用groupadd命令,这个是不是非常的方便呀,其实复杂点的就是用户的组与组权限的命令了,下 ...
- 【mybatis源码学习】mybatis的反射模块
一.重要的类和接口 org.apache.ibatis.reflection.MetaClass//对于javaBean的calss类进行反射操作的代理类(获取属性的类型,获取属性的get,set方法 ...
- vue elementUi tree 懒加载使用详情
背景:vue下使用elementUI 文档:http://element-cn.eleme.io/#/zh-CN/component/tree#tree-shu-xing-kong-jian 需求:只 ...
- hive中function函数查询
1. desc function [函数名] desc function xpath; 查询用法: 2. desc function extended [函数名] desc function exte ...
- PHP 发送 POST 值到任意 url
以下方法可以实现将 POST 值发送到 url,并获取返回值 $url = 'http://www.someurl.com'; $myvars = 'myvar1=' . $myvar1 . '&am ...
- Ubuntu / CentOS 安装 Anaconda 并创建虚拟环境
Anaconda可以很好地帮我们管理Python的虚拟环境,Windows上操作极其方便,现在讲一下 Ubuntu 和 CentOS 上的使用方法 ubuntu 安装Anaconda版本 安装方法一: ...
- IDEA中不编译src/main/java目录下的*.xml文件
使用idea构建maven项目时不编译src/main/java目录下写的mapper.xml文件,这是找到pom.xml文件,在<build>节点下添加如下代码: <!-- map ...
- Swift编码总结5
1.UIWindow属性: 1>.- (void)becomeKeyWindow; // override point for sub ...
- 使用EF 4.1的DbContext的方法大全
简述:EF4.1包括Code First和DbContext API.DbContext API为EF提供更多的工作方式:Code First,Database First和Model First. ...
- [LeetCode] 282. Expression Add Operators 表达式增加操作符
Given a string that contains only digits 0-9 and a target value, return all possibilities to add bin ...