最近体验到Android Studio经常挂。就在任何编辑器中输入的过程中,它会挂起并阻止我做任何其他事情几秒钟。重新启动或终止 adb 都无济于事。
一段时间后,我意识到如果正在加载和显示文档,就会发生这种情况。这主要发生在 Android 文档中,该文档非常冗长并且似乎还包含图像和格式。
我已经尝试关闭 Auto-update from source
选项,但这并没有改变任何东西。
有什么想法会导致 Android Studio 在加载或显示(或处理)文档时阻塞?
我使用的是 Android Studio 2.1.1,这是带有安全修复程序的最新版本。
最佳答案
您可以查看此解决方案:https://stackoverflow.com/a/26149069/2133585
Here's what fixed it for me:
- Make sure you have the Documentation package downloaded in SDK Manager.
- Exit Studio if it's running.
- Delete the file named "jdk.table.xml" located in ~/.AndroidStudioX.Y/config/options/ (remember to take a backup first!).
- Relaunch Android Studio. should work correctly now and it should regenerate the file automatically.
Note:
- This worked for me on Ubuntu 14.04 & Android Studio 0.8.11 (EDIT: Several users are reporting this solution also works for newer versions of Android Studio).
- If it still doesn't work, try deleting and re-downloading the Documentation package from inside Android SDK Manager then try the above steps.
- If you're running Windows, the file is located at "%UserProfile%.AndroidStudio\config\options", and if you're running OS X, it's located at "~/Library/Preferences/AndroidStudio/options" (credits to @Gero and @Alex Lipov).
修复仍然适用于 AS 2.2.3 和 MacOS 10.12.2 Sierra
关于Android Studio 在获取文档时挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37318042/