Android Lint 不显示翻译缺失错误
我在 Windows 上使用 Android SDK 16.1 和 Eclipse。
我已按照文档将 ANDROID_LINT_COMPLETE_REGIONS 设置为 Windows 环境变量
我已重新启动计算机。
我已验证 System.getenv("ANDROID_LINT_COMPLETE_REGIONS") 使用 Windows 系统变量。
我已经确认翻译错误已打开。
然而,我想要/期望的错误不是。我在“/res/values/strings.xml”中有一个英文字符串,但不在“/res/values-xx/strings.xml”中。我预计 lint 会出错,因为我已经设置了 ANDROID_LINT_COMPLETE_REGIONS。查看SDK中的源代码,似乎应该可以工作。
有人还有其他我应该尝试的东西吗?
更新: 我在 Mac 上尝试过此操作,虽然我坚持使用 ANDROID_LINT_COMPLETE_REGIONS="1",但在 Eclipse 中无法出现错误。
I am using Android SDK 16.1 with Eclipse on Windows.
I've set ANDROID_LINT_COMPLETE_REGIONS as a Windows environment variable per the documentation
I've rebooted my computer.
I've verified the System.getenv("ANDROID_LINT_COMPLETE_REGIONS") uses Windows System Variables.
I've verified that translation errors are turned on.
However, what I'm wanting/expecting to error is not. I have an English string in "/res/values/strings.xml" that is not in "/res/values-xx/strings.xml". I expect lint to error because I've set ANDROID_LINT_COMPLETE_REGIONS. Looking at the source in the SDK, it seems like it should work.
Anyone got something else I should try?
Update:
I have tried this on a Mac and while I have persisted ANDROID_LINT_COMPLETE_REGIONS="1", I can't get an error to occur in Eclipse.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
无论这个问题是什么,升级到 Android SDK 17 都为我解决了这个问题。 Lint 现在可以检测我何时不翻译字符串。
Whatever this problem was, upgrading to Android SDK 17 fixes this issue for me. Lint can now detect when I do not translate a string.
我将其设置为用户变量(Windows XP),使用 set 命令验证它是否出现在 cmd 提示符中,并且重新启动后它似乎可以在 eclipse 中工作。
I set it as a user variable (Windows XP), verified that it appears in a cmd prompt with the set command, and it appears to be working in eclipse after restarting it.