如何在android studio中打开android文档和代码示例

时间:2021-07-27 20:50:43

I have downloaded all documentation with SDK manager help. But how can I open this documentation and the samples of code in Android Studio after downloading?

我已经下载了所有的文件与SDK管理器的帮助。但是下载后如何打开这个文档和Android Studio中的代码示例呢?

5 个解决方案

#1


4  

First you need to make sure the documentation is added to Android Studio.

首先,您需要确保将文档添加到Android Studio中。

Go to File -> Project Structure. Under the Platform Settings heading, add or select an Android Platform. Go to the Documentation Paths tab and make sure the path to your SDK's documenation folder is added there - it should be [SDK]\docs\reference, where [SDK] is the full path to your SDK installation. If it is not there add it manually.

点击文件->项目结构。在平台设置标题下,添加或选择一个Android平台。转到“文档路径”选项卡,确保将SDK文档文件夹的路径添加到其中——它应该是[SDK]\文档参考,其中[SDK]是SDK安装的完整路径。如果没有,手动添加。

Once this is done, use Ctrl+F1 while your cursor is on the item you want to display help for.

完成后,使用Ctrl+F1,而光标在要显示帮助的项目上。

The samples have not been ported to Android Studio yet, but I'm sure google will get around to it at some point. For now follow the instructions in the comments by androidika (you will need a copy of Eclipse installed).

这些示例还没有被移植到Android Studio中,但是我确信谷歌在某个时候会用到它。现在请遵循androidika评论中的说明(您需要安装一个Eclipse的副本)。

#2


14  

According to Android Studio Tips and Tricks, you can press Ctrl+Q to show docs for selected API under Windows or F1 under Mac.

根据Android工作室的提示和技巧,你可以按下Ctrl+Q来显示在Windows下或在Mac下选择的API的文档。

For the samples , you can use eclipse to export to Android Studio.

对于示例,可以使用eclipse将其导出到Android Studio。

#3


5  

I was trying to find this setting in the latest build of android studio, and after wasting a lot of time I finally found out that now the ide automatically finds the documentation, which can be opened with shift+f1 on a method.

我试图在android studio的最新版本中找到这个设置,在浪费了很多时间之后,我终于发现,现在ide自动地找到了文档,可以在方法上使用shift+f1打开文档。

#4


5  

In Android Studio you need to download javadoc dependency which is part of sdk.

在Android Studio中,您需要下载javadoc依赖项,它是sdk的一部分。

If you enable documentation to appear while writing code in android studio by navigating to

如果您允许文档在android studio中通过导航显示

File-> Settings-> Editor-> General-> Other

文件->设置->编辑器->通用->其他

and

selecting(check box) Show Quick documentation on mouse move, you would get irritating after some time because it will come out automatically you when you would be writing code.

选择(复选框)显示鼠标移动的快速文档,一段时间后你会感到愤怒,因为当你要编写代码时,它会自动跳出来。

So, I think we should go to alternative ways by using Ctrl + Q(on Ubuntu at least I am not sure of other environments). This way when you would feel help you can simply use the simple command.

因此,我认为我们应该使用Ctrl + Q(至少在Ubuntu上,我不太确定其他环境)来替代。通过这种方式,当您感到有帮助时,您可以使用简单的命令。

#5


0  

Now a days once you Import project in Android studio, it will automatically shows docs. But on mouse hover you want to expand it.

现在,一旦你在Android studio中导入项目,它会自动显示文档。但在鼠标悬停时,你想要展开它。

如何在android studio中打开android文档和代码示例

Docs hover page was simply resized very short like the above, it looks like docs is not avail. But when I Carefully moving the mouse down to the bottom of the hover page allowed me to resize it.

文档悬停页面被简单地调整为非常短的大小,就像上面所示,看起来文档是没用的。但是当我小心翼翼地将鼠标移动到鼠标悬停页面的底部时,我可以调整它的大小。

#1


4  

First you need to make sure the documentation is added to Android Studio.

首先,您需要确保将文档添加到Android Studio中。

Go to File -> Project Structure. Under the Platform Settings heading, add or select an Android Platform. Go to the Documentation Paths tab and make sure the path to your SDK's documenation folder is added there - it should be [SDK]\docs\reference, where [SDK] is the full path to your SDK installation. If it is not there add it manually.

点击文件->项目结构。在平台设置标题下,添加或选择一个Android平台。转到“文档路径”选项卡,确保将SDK文档文件夹的路径添加到其中——它应该是[SDK]\文档参考,其中[SDK]是SDK安装的完整路径。如果没有,手动添加。

Once this is done, use Ctrl+F1 while your cursor is on the item you want to display help for.

完成后,使用Ctrl+F1,而光标在要显示帮助的项目上。

The samples have not been ported to Android Studio yet, but I'm sure google will get around to it at some point. For now follow the instructions in the comments by androidika (you will need a copy of Eclipse installed).

这些示例还没有被移植到Android Studio中,但是我确信谷歌在某个时候会用到它。现在请遵循androidika评论中的说明(您需要安装一个Eclipse的副本)。

#2


14  

According to Android Studio Tips and Tricks, you can press Ctrl+Q to show docs for selected API under Windows or F1 under Mac.

根据Android工作室的提示和技巧,你可以按下Ctrl+Q来显示在Windows下或在Mac下选择的API的文档。

For the samples , you can use eclipse to export to Android Studio.

对于示例,可以使用eclipse将其导出到Android Studio。

#3


5  

I was trying to find this setting in the latest build of android studio, and after wasting a lot of time I finally found out that now the ide automatically finds the documentation, which can be opened with shift+f1 on a method.

我试图在android studio的最新版本中找到这个设置,在浪费了很多时间之后,我终于发现,现在ide自动地找到了文档,可以在方法上使用shift+f1打开文档。

#4


5  

In Android Studio you need to download javadoc dependency which is part of sdk.

在Android Studio中,您需要下载javadoc依赖项,它是sdk的一部分。

If you enable documentation to appear while writing code in android studio by navigating to

如果您允许文档在android studio中通过导航显示

File-> Settings-> Editor-> General-> Other

文件->设置->编辑器->通用->其他

and

selecting(check box) Show Quick documentation on mouse move, you would get irritating after some time because it will come out automatically you when you would be writing code.

选择(复选框)显示鼠标移动的快速文档,一段时间后你会感到愤怒,因为当你要编写代码时,它会自动跳出来。

So, I think we should go to alternative ways by using Ctrl + Q(on Ubuntu at least I am not sure of other environments). This way when you would feel help you can simply use the simple command.

因此,我认为我们应该使用Ctrl + Q(至少在Ubuntu上,我不太确定其他环境)来替代。通过这种方式,当您感到有帮助时,您可以使用简单的命令。

#5


0  

Now a days once you Import project in Android studio, it will automatically shows docs. But on mouse hover you want to expand it.

现在,一旦你在Android studio中导入项目,它会自动显示文档。但在鼠标悬停时,你想要展开它。

如何在android studio中打开android文档和代码示例

Docs hover page was simply resized very short like the above, it looks like docs is not avail. But when I Carefully moving the mouse down to the bottom of the hover page allowed me to resize it.

文档悬停页面被简单地调整为非常短的大小,就像上面所示,看起来文档是没用的。但是当我小心翼翼地将鼠标移动到鼠标悬停页面的底部时,我可以调整它的大小。