Android Studio 在获取文档时挂起

标签 android android-studio android-studio-2.1

最近体验到Android Studio经常挂。就在任何编辑器中输入的过程中,它会挂起并阻止我做任何其他事情几秒钟。重新启动或终止 adb 都无济于事。

一段时间后,我意识到如果正在加载和显示文档,就会发生这种情况。这主要发生在 Android 文档中,该文档非常冗长并且似乎还包含图像和格式。

Example documentation that causes Android Studio to hang

我已经尝试关闭 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/

相关文章:

android - Firebase - 用户评论事物

android - 将库和应用程序从 Eclipse 迁移到 Android Studio

java - gradle 脚本中的实现错误 - android studio api28

android - 安装应用程序和卸载不会完全删除 - Android Studio

android-studio-2.2 - Aldebaran's Pepper sdk for android/Robot sdk 0.9 "Robot SDK' 0. 9' is not complete. Please download it again or re-create the robot application."

android - 使用 android studio 'instant run' 启动应用程序非常慢

android - 移动应用程序的 2 因素身份验证

android - 如何在 Android 库项目中进行调试?

android - 检查所有 AsyncTask 是否已完成

xml - 如何将一对unicode字符放入string.xml文件android studio中?