Android Studio和lint.xml [英] Android Studio and lint.xml

查看:110
本文介绍了Android Studio和lint.xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个 lint.xml 文件并在我们的VCS上共享它,以便所有项目的贡献者都可以使用它. Google文档指出:

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:

如果您在Android Studio中配置棉绒偏好设置,则会自动创建 lint.xml 文件并将其添加到您的Android项目中

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

对于我的项目,它.我不知道将我对检查所做的更改保存在哪里.如果我单击Prefercens => Editor => Inspections => Export,那么它将导出完全不同的文件结构:

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>

代替皮棉:

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

如果要单击分析=>检查代码",我想在IDE 中控制我的警告,该警告可以在VCS上共享.那可能吗?

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?

推荐答案

编辑IntelliJ检查设置似乎更好,它包括皮棉和多余的IntelliJ检查,而不仅仅是皮棉.

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

您可以在Android Studio中导出和导入IntelliJ检查设置,然后与队友共享.

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

这篇关于Android Studio和lint.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆