如何离线使用Android SDK文档 [英] How to use Android SDK Documentation offline

查看:433
本文介绍了如何离线使用Android SDK文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用SDK Manager下载了Android SDK文档,以便离线使用Android Studio v2.3.0.8.

I've downloaded Android SDK Documentation using SDK Manager, to use it with Android Studio v2.3.0.8, offline.

但是每次我按ctrl + q来显示有关类型|类型成员的快速信息时,它都会显示正在获取文档...",并且在等待20秒后,它会显示该信息.

But everytime I press ctrl+q to show quick info about a type|type-member, it shows "Fetching Documentation...", and after waiting for ~20s, it shows the info.

我不希望出现延迟或使用在线帮助,并且本地文档已经准备就绪,那为什么呢? 那么解决方案是什么?

I don't want that delay or using online help, and the local docs are in place, so why is that ? And what is the solution ?

这种情况在我在线时发生,但在我离线时完全没有延迟就像IDE试图获取文档的新版本一样.

推荐答案

改进的用于显示文档的解决方案(从来源).

发现,如果通过SDK管理器下载文档(它将位于.../sdk/docs/reference中),则将使用only 24 API documentation. (想象一下,例如,您的项目目标SDK是25或22.)

Found, that if you download documentation via SDK manager (it will be located in .../sdk/docs/reference), you're going to use only 24 API documentation. (Imagine, your project target SDK is 25 or 22, for instance).

要解决此问题,您需要:

To fix this, you need:

  1. 通过Android Studio中的SDK管理器删除文档.
  2. 就在那儿,下载感兴趣的API的资源(这些资源已经包含文档).我还发现,与.../sdk/docs/reference内部的离线版本相比,获取documentation from sources的速度更快.
  3. jdk.table.xml删除所有javadoc路径.在OS X上此文件的路径:~/Library/Preferences/AndroidStudio.../options/jdk.table.xml

  1. Delete documentation via SDK manager in Android Studio.
  2. Right there, download sources for interested APIs (sources already contain documentation). Also I found, that fetching documentation from sources a bit faster comparing with offline one inside .../sdk/docs/reference.
  3. Delete all javadoc paths from jdk.table.xml. Path to this file on OS X: ~/Library/Preferences/AndroidStudio.../options/jdk.table.xml

--> Delete all of these and all occurrences -->

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

  • 重新启动Studio.享受吧!
  • 这篇关于如何离线使用Android SDK文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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