我遵循了this教程,它对我来说非常适合.现在我想添加修复问题功能.我正在使用Eclipse.
在Lint Warnings视图中我们有Fix按钮,我可以处理吗?
例如,当您单击CTRL 1时,我们在TextView中有硬编码字符串(android:text =“Test”),帮助弹出窗口打开,可能会提取字符串.我想要做的是添加提取硬编码的dp值功能.
如果你能指出我在哪里可以找到已经实现的lint问题的源代码,那也很棒.
谢谢.
最佳答案
Lint检查可以单独编写:
原文链接:https://www.f2er.com/android/430721.html>写一个Lint检查:http://tools.android.com/tips/lint/writing-a-lint-check
> Lint检查来源:https://android.googlesource.com/platform/tools/base/+/master/lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks
Lint修复是ADT插件的一部分:http://tools.android.com/tips/lint
Lint is integrated with ADT 16 and later. The integration offers a few features above the command line version of lint:
- Automatic fixes for many warnings
- Lint gets run automatically on varIoUs editing operations
- Ability to suppress types of errors as well as specific instances of an error
- Ability to configure issue severities
- Jump directly to the problem source from the lint view