Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Element ignore is not allowed here, in Android lint.xml

Tags:

android

xml

lint

I'm currently working on reducing the lint warnings/errors in my Android project. I'm fixing as many as possible, but some don't apply to my project and others come from 3rd party libraries etc.

So I'm setting up some lint rules in a lint.xml file within my app/ so that it gets automatically picked up.

Here's a cut down version of my lint file:

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

Now these lint rules are picked up correctly and work, but Android Studio is syntax highlighting ignore red, and saying "Element ignore is not allowed here", the same is true of all the ignore tags in this xml file.

Can anyone help me get rid of this annoying red?

like image 877
Jon Finerty Avatar asked May 16 '16 16:05

Jon Finerty


1 Answers

This issue is described here: https://code.google.com/p/android/issues/detail?id=200884

It is fixed in Android Studio 2.2, which was released today!

like image 147
Codiak Avatar answered Oct 09 '22 19:10

Codiak