简体   繁体   English

设置android studio 0.8的本地文档

[英]Set local documentation for android studio 0.8

I want to set local documentation path in android studio 0.8, but i cant do this. 我想在android studio 0.8中设置本地文档路径,但我不能这样做。 I google this, but i can't find any solution for this problem. 我谷歌这个,但我找不到任何解决这个问题的方法。 Can any body help me please. 任何身体都可以帮助我。 Thanks a lot. 非常感谢。

I had the same problem.Documentation was empty when I used documentation shortcut(ctrl + Q) and I also couldn't change the documentation paths because it wasn't there! 我有同样的问题。当我使用文档快捷方式(ctrl + Q)时,文档是空的,我也无法更改文档路径,因为它不存在! so here is the solution: 所以这是解决方案:

  1. Delete C:\\Users[user name].AndroidStudioBeta folder.(Don't worry it just delete your configurations! ;) ) 删除C:\\ Users [用户名] .AndroidStudioBeta文件夹。(别担心它只是删除你的配置!;))
  2. rename C:\\Program Files (x86)\\Android\\android-studio\\sdk (SDK path)folder to something else. C:\\ Program Files(x86)\\ Android \\ android-studio \\ sdk (SDK路径)文件夹重命名为其他内容。
  3. run Android studio and make sure you don't import you configurations. 运行Android studio并确保不导入配置。
  4. Now you can change new sdk folder's name back to SDK . 现在您可以将新的sdk文件夹的名称更改回SDK。
  5. Android studio will ask you new path for SDK ,so you can continue. Android工作室会问你SDK的新途径,所以你可以继续。

I found the solution in Android Studio 2.1 : First, you have to see which Android SDK you are using from the Project Structure . 我在Android Studio 2.1中找到了解决方案:首先,您必须从Project Structure查看您正在使用的Android SDK。 Currently I am using Android 7.0 because the problem was caused by Android 7.1.1 SDK (I will explain why). 目前我使用的是Android 7.0,因为问题是由Android 7.1.1 SDK引起的(我将解释原因)。

项目结构

Now, open the Standalone SDK Manager . 现在,打开Standalone SDK Manager Find the SDK version that you use, then select Documentation for Android SDK then Install package and you will have a local copy of the docs automatically used by your AS. 找到您使用的SDK版本,然后选择Documentation for Android SDK ,然后选择Install package ,您将获得AS自动使用的文档的本地副本。

Android独立SDK管理器

As you can see, there is no documentation available to download for Android 7.1.1, that's why Android Studio was loading it from the Android developer website. 正如您所看到的,Android 7.1.1没有可供下载的文档,这就是Android Studio从Android开发者网站加载它的原因。

So, the solution is to use an Android SDK that has a downloadable documentation. 因此,解决方案是使用具有可下载文档的Android SDK。

If you have downloaded the documentation using SDK manager, it'll get added automatically when you add an SDK in "Project Structure" 如果您使用SDK管理器下载了文档,则在“项目结构”中添加SDK时会自动添加该文档

In Android Studio, You can verify this by selecting File -> Project Structure -> SDKs (on left pane). 在Android Studio中,您可以通过选择文件 - >项目结构 - > SDK(左窗格)来验证这一点。

Select one added SDK from the list, Select the tab "Documentation Paths" from right most pane. 从列表中选择一个添加的SDK,从最右侧窗格中选择“文档路径”选项卡。 Check whether the path is automatically added. 检查路径是否自动添加。 If not, add it manually by clicking the plus (+) button on right. 如果没有,请单击右侧的加号(+)按钮手动添加。

The only way I could accomplish this on AS 1.0 is to run local web server (Abyss Web Server) to host the documentation from here (C:\\Program Files (x86)\\Android\\sdk\\docs). 我在AS 1.0上完成此任务的唯一方法是运行本地Web服务器(Abyss Web Server)来从此处托管文档(C:\\ Program Files(x86)\\ Android \\ sdk \\ docs)。 And use Fiddler as proxy to remap url developer.android.com to 127.0.0.1:8080 (Abyss address), setting Fiddler's address as proxy in AS settings. 并使用Fiddler作为代理将url developer.android.com重新映射到127.0.0.1:8080(Abyss地址),将Fiddler的地址设置为AS设置中的代理。

Oh, and created a .bat file to run and stop this all together. 哦,并创建了一个.bat文件来运行并停止这一切。

Really dirty trick, but the only I found. 真肮脏的把戏,但我发现的唯一。

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

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