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 docum
you can disable it, in Android Studio Preference
Android Studio -> Preference -> Editor -> General -> Code Completion -> Show the documentation pupup in XX ms
see my another answer Link
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.
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/">
On Windows, the file jdk.table.xml is under
C:\Users\Name\.AndroidStudio<version>\config\options
In AndroidStudio 3.3, modify to
<root type="simple" url="file://$USER_HOME$/AppData/Local/Android/sdk/docs/reference" />
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.
File location of jdk.table.xml
C:\Users\[your windows user name]\.AndroidStudio2.3\config\options\jdk.table.xml
Notes
Before
<root type="simple" url="http://developer.android.com/reference/" />
After
<root type="simple" url="file://C:/Android/sdk/docs/reference" />
Notes
C:/Android/sdk/docs/reference
replace with Android SDK location on your machine\
) with forward slashes (/
)<name value="Android API 25 Platform" />
File -> Invalidate Caches / Restart...
I found a solution.
Now you can change back the sdk path or using the new sdk path.
You will find Ctrl+Q will work fine. (Don't import old setting)
I think we need download the sdk document before set the sdk path to Android studio. But the Android studio should handle this case or give us a option to set it.
UPDATE: out-of-date, please check @Htea's answer.
I was having the same issue as you. Here's what fixed it for me:
Note:
Hope it helps.
For android studio 3.4, all you need to do is go to sdk manager -> SDK Tools, check "Documentation for Android SDK" and click apply.
It will automatically update the jdk.table.xml to point to the source you have downloaded.