Android Studio 快速文档总是“获取文档" [英] Android Studio quick documentation always "fetching documentation"

查看:38
本文介绍了Android Studio 快速文档总是“获取文档"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚从 Eclipse 转到 Android Studio,我发现它总是显示正在获取文档";当我使用快速文档 (Ctrl+Q) 时.

I just moved to Android Studio from Eclipse, and I found that it always shows "fetching documentation" when I use quick documentation (Ctrl+Q).

我该如何解决这个问题?我下载了 API 19 的文档,问题依旧.

How can I solve this problem? I downloaded the documentation for API 19, and the problem persists.

推荐答案

问题是即使已经下载了文档,Android Studio 也不会自动更新参考源链接.

The problem is Android Studio does not automatically update the source link of reference even when the documentation is already downloaded.

jdk.table.xml 中的默认链接是 http://developer.android.com/reference/(即使网络被阻塞,android studio 也会尝试连接到该在线服务器).

The default link in jdk.table.xml is http://developer.android.com/reference/ (android studio tries to connect to this online server even if the network is blocked).

为了解决这个问题,我们可以将引用重定向到本地源.

To solve the problem, we can just redirect the reference to local source.

在 MacOS 上,配置文件 jdk.table.xml~/Library/Preferences/AndroidStudio/options/,文档在这里:~/Library/Android/sdk/docs/,或您的 Android SDK 的自定义路径.

On MacOS, the config file jdk.table.xml is under ~/Library/Preferences/AndroidStudio<version>/options/, and the docs are here: ~/Library/Android/sdk/docs/, or the custom path of your Android SDK.

jdk.table.xml中,找到所有的行:

<root type="simple" url="http://developer.android.com/reference/">

并将它们修改为

<root type="simple" url="file://$USER_HOME$/Library/Android/sdk/docs/reference/">

视窗

在 Windows 上,文件 jdk.table.xml 位于C:\Users\Name\.AndroidStudio\config\options

在AndroidStudio 3.3中,修改为

In AndroidStudio 3.3, modify to

<root type="simple" url="file://$USER_HOME$/AppData/Local/Android/sdk/docs/reference"  />

Android Studio(任何操作系统)

然后,在 File ->Invalidate Caches/Restart… 选择 Invalidate,然后使用 Quick Documentation 重试.它应该立即显示.如果没有,请选择 Invalidate and Restart,然后你就可以开始了.

Android Studio (any os)

Then, in File -> Invalidate Caches / Restart… select Invalidate, and retry using Quick Documentation. It should display instantly. If it doesn't, select Invalidate and Restart, and you should be good to go.

这篇关于Android Studio 快速文档总是“获取文档"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆