简体   繁体   English

Android Studio停止获取文档

[英]Android Studio hangs at fetching documentation

Recently I experienced that Android Studio is hanging a lot. 最近,我经历了Android Studio的困扰。 Right in the middle of typing in any editor it will hang and block me from doing anything else for a couple of seconds. 在输入任何编辑器的过程中,它会挂起并阻止我执行其他操作几秒钟。 Restarting or killing adb wouldn't help. 重新启动或杀死adb并没有帮助。

After a while I realized that this happens if the documentation is being loaded and displayed. 一段时间后,我意识到如果正在加载和显示文档,则会发生这种情况。 This happens mostly for Android documentation, which is quite verbose and also seems to contain images and formatting. 这种情况主要发生在Android文档上,该文档非常冗长,而且似乎包含图像和格式。

导致Android Studio挂起的示例文档

I already tried switching off the Auto-update from source option, but that doesn't change anything. 我已经尝试关闭“ Auto-update from source选项,但这并没有任何改变。

Any ideas what could cause Android Studio to block while it's loading or displaying (or doing whatever with) the documentation? 有什么想法会导致Android Studio在加载或显示文档(或对其进行任何处理)时阻塞?

I'm using Android Studio 2.1.1 , the latest build with the security fix. 我正在使用带有安全修复程序的最新版本Android Studio 2.1.1

you can check this solution: https://stackoverflow.com/a/26149069/2133585 您可以检查此解决方案: https : //stackoverflow.com/a/26149069/2133585

Here's what fixed it for me: 这是为我解决的问题:

  • Make sure you have the Documentation package downloaded in SDK Manager. 确保已在SDK Manager中下载了文档包。
  • Exit Studio if it's running. 如果正在运行,请退出Studio。
  • Delete the file named "jdk.table.xml" located in ~/.AndroidStudioX.Y/config/options/ (remember to take a backup first!). 删除〜/ .AndroidStudioX.Y / config / options /中名为“ jdk.table.xml”的文件(请记住要先备份!)。
  • Relaunch Android Studio. 重新启动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). 这在Ubuntu 14.04和Android Studio 0.8.11上对我有用( 编辑 :一些用户报告说该解决方案也适用于更新版本的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. 如果仍然无法使用,请尝试从Android SDK Manager中删除并重新下载文档包,然后尝试上述步骤。
  • 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). 如果您正在运行Windows,则该文件位于“%UserProfile%.AndroidStudio \\ config \\ options”,如果您正在运行OS X,则该文件位于“〜/ Library / Preferences / AndroidStudio / options”( @Gero和@Alex Lipov)。

Fix still works for AS 2.2.3 and MacOS 10.12.2 Sierra 该修复程序仍适用于AS 2.2.3和MacOS 10.12.2 Sierra

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM