问题
In Android Studio, spellchecking seems to be disabled for language specific strings.xml files (and I understand why it would be disabled by default).
But is it possible to enable it, to check values, for a couple of those files? ("fr/strings.xml" for example), or at least run it on demand.
回答1:
To avoid or to enforce spellchecking you could add tools:locale to the <resources> tag in your string xml.
<resources xmlns:tools="http://schemas.android.com/tools" tools:locale="en">
This tells Lint your resources' locale.
Source: http://alexsimo.com/mastering-tools-namespace-android/
回答2:
Yes, go to Android Studio Preferences > Editor > Inspections > Spelling > Typo (check the box). Also make sure all scopes have been selected.
Incorrect spellings in the strings file show up with a light green line, clicking on which would show a message that it may be a typo.
来源:https://stackoverflow.com/questions/42251944/enable-android-studio-spell-checking-on-language-specific-strings-xml-files