Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

ide - Android Studio quick documentation always "fetching documentation"

I just move to Android studio from eclipse,I found that it always shows "fetching documentation" when I use quick documentation(Ctrl+Q),How to solve this?(I download documentation for API19,still problem) enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

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

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.

In jdk.table.xml, find all the lines:

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

and modify them to

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

Windows

On Windows, the file jdk.table.xml is under C:UsersName.AndroidStudio<version>configoptions

In AndroidStudio 3.3, modify to

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

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...