Frank Frank - 1 month ago 12
Android Question

Android Studio and lint.xml

I want to create a lint.xml file and share it on our VCS so all the project's contributors can use it. The Google documentation states:


If you are configuring lint preferences in Android Studio, the lint.xml file is automatically created and added to your Android project for you


It does not for my project. I do not know where it saves the changes that I make to the inspections. If I click on Prefercens => Editor => Inspections => Export, then it exports a totally different file structure:

<?xml version="1.0" encoding="UTF-8"?>
<inspections version="1.0">
<option name="myName" value="Blabla" />
</inspections>


instead of lint's:

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


I would like to control my warnings in the IDE and if I click "Analyze => Inspect Code", in one place that can be shared on the VCS. Is that possible?

Answer

Editing IntelliJ inspection settings is better it seems, it includes lint AND the extra IntelliJ inspections both, instead of just lint.

You can export and import IntelliJ inspection settings in Android Studio, and then share it with your team mates.