可以在 Android Studio 的设置中禁用拼写检查或者添加一个自定义字典来解决这个问题。
禁用拼写检查:
- 打开 Android Studio,选择 Preferences(Mac)或者 Settings(Windows)。
- 在左侧导航栏中选择 Editor > Inspections。
- 在检查列表中找到 Typo 这一项,然后取消勾选 Enable spellchecking 选项。
- 单击 Apply 或者 OK 按钮保存设置。
添加自定义字典:
- 打开 Android Studio,选择 Preferences(Mac)或者 Settings(Windows)。
- 在左侧导航栏中选择 Editor > Spelling。
- 在 Custom Dictionaries 部分点击加号,创建一个新的字典文件,并命名为 custom.dict。
- 打开 custom.dict 文件,将需要添加到字典中的单词一行一个添加。
例如:
Андроид
Макбук
- 将 custom.dict 文件保存至 Android Studio 的配置目录。
Mac: ~/Library/Spelling/
Windows: C:\Users\username.AndroidStudio\config\spellchecker
- 重新启动 Android Studio。
- 在设置中找到 Editor > Spelling 选项卡并选择 custom.dict 作为自定义字典。
- 单击 Apply 或者 OK 按钮保存设置。
以上两种方法均可解决 Android Studio 在 Cyrillic 注释中进行拼写检查的问题,您可以根据自己的需要选择其中一种方法。