Android 由于hc_characterdataindexsizeerrsubstringoffsetgreater,studio 2.2 无法打开源文件

Android studio 2.2 unable to open source file due to hc_characterdataindexsizeerrsubstringoffsetgreater

我在 Android Studio 工作,由于某些未知原因我的系统(Windows 桌面)关闭了。当我重新启动系统,启动 Android Studio 时,它显示在下面的警告

Cannot load settings from file 'C:\Users\Monish.AndroidStudio2.2\config\options\feature.usage.statistics.xml': Error on line 2: Content is not allowed in prolog.

File content will be recreated

我正在处理的源文件更改如下:

如果我尝试打开它 Android Studio 停止响应。我可以打开其他源文件。

如果有人遇到过这个问题,我想知道背后的原因以及如何从中恢复。

问题是这样解决的:

  1. 从 Windows 资源管理器,将文件复制到其他目录。
  2. 打开 Android Studio -> 删除文件并重建项目。
  3. 将文件粘贴回 Android Studio -> Rebuild Project 中的项目。
  4. 使用“无效并重新启动”选项重新启动 Android Studio(文件 -> 无效并重新启动)。

不知道背后的确切原因。正如@Max Rockwood 所建议的,这可能是

的原因

The file renamed itself because of some system error.