gpt4 book ai didi

android - 此处不允许元素忽略,在 Android lint.xml 中

转载 作者:塔克拉玛干 更新时间:2023-11-02 18:59:42 25 4
gpt4 key购买 nike

我目前正在努力减少我的 Android 项目中的 lint 警告/错误。我正在修复尽可能多的问题,但有些不适用于我的项目,而另一些则来自第 3 方库等。

因此,我在 app/ 中的 lint.xml 文件中设置了一些 lint 规则,以便自动获取它。

这是我的 lint 文件的精简版:

<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="UnusedResources">
<ignore regexp=".*google-services.*" />
</issue>
</lint>

现在这些 lint 规则被正确拾取并起作用,但是 Android Studio 语法高亮显示 ignore 红色,并说“此处不允许元素忽略”,所有忽略标记也是如此在此 xml 文件中。

谁能帮我去掉这个烦人的红色?

最佳答案

此处描述了此问题:https://code.google.com/p/android/issues/detail?id=200884

它已在今天发布的 Android Studio 2.2 中修复!

关于android - 此处不允许元素忽略,在 Android lint.xml 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37258309/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com