简体   繁体   English

如何获取网站“developer.android.com”的源代码?

[英]How to get the source code of site “developer.android.com”?

In fact, I've found the source files of site "source.android.com" at https://android.googlesource.com/platform/docs/source.android.com It uses markdown format to write articles and use related python tools to generate the web site. 事实上,我在https://android.googlesource.com/platform/docs/source.android.com上找到了网站“source.android.com”的源文件。它使用markdown格式编写文章并使用相关的python生成网站的工具。

Although the static html file of the developer site can be downloaded through sdk tools, but I want to get the source code similar to which I get from site source.android.com, not just the static html content. 虽然开发者网站的静态html文件可以通过sdk工具下载,但我想获得类似于我从网站source.android.com获得的源代码,而不仅仅是静态html内容。 In my opinion, the site must be generated by some useful tools, for example javadoc. 在我看来,该网站必须由一些有用的工具生成,例如javadoc。 Is that true? 真的吗?

Thanks for your help! 谢谢你的帮助!

Did you mean building developer documentation which is located on [Android SDK]/docs? 您的意思是建立位于[Android SDK] / docs上的开发人员文档吗?
All you need to do is 'make sdk'. 你需要做的就是'make sdk'。 This will make the android sdk from full source, including developer documentation. 这将使android sdk完全来源,包括开发人员文档。

Steps to make developer documentation : 制作开发人员文档的步骤:

  1. Download android source from source.android.com source.android.com下载android源代码
  2. Set build environment with following command : 使用以下命令设置构建环境:

    $ repo init -u https://android.googlesource.com/platform/manifest -b master -g all,-notdefault,tools $ repo init -u https://android.googlesource.com/platform/manifest -b master -g all,-notdefault,tools

    if you already downloaded the source, just type 如果您已经下载了源代码,请输入

    $ repo init -g all ; $ repo init -g all; repo sync 回购同步

  3. invoke following command to build Android SDK 调用以下命令来构建Android SDK

    $ cd [ANDROID_FULL_SOURCE_DIR] $ cd [ANDROID_FULL_SOURCE_DIR]
    $ . $。 build/envsetup.sh (or source build/envsetup.sh on mac) $ lunch sdk-eng $ make sdk build / envsetup.sh(或mac上的source build / envsetup.sh)$ lunch sdk-eng $ make sdk

  4. The documentation will be generated at out/host/[HOST_OS]-[HOST_ARCH]/sdk/ folder. 该文档将在out / host / [HOST_OS] - [HOST_ARCH] / sdk /文件夹中生成。

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

相关问题 如何从developer.android.com获取示例测试代码(ActivityInstrumentation)来运行? - How do I get the Sample test code (ActivityInstrumentation) from developer.android.com to run? 在developer.android.com/guide上哪里可以找到android文档的源代码? - Where I can find the source code for the android document on developer.android.com/guide? 如何使用RecyclerView,尝试遵循developer.android.com建议,但得到错误 - How to use RecyclerView, Trying to follow developer.android.com suggestion but get error 如何从developer.android.com打开项目? - how to open projects from developer.android.com? 如何理解developer.android.com中关于broadcastreceiver的句子? - How to understand this sentences in developer.android.com about broadcastreceiver? Android:使用developer.android.com离线? - Android: use developer.android.com offline? 在developer.android.com中使用的IDE - IDE that used in developer.android.com developer.android.com服务教程不明确 - developer.android.com Service tutorial not clear developer.android.com/training bitmapfun项目 - developer.android.com/training bitmapfun project 我如何将示例应用程序从developer.android.com导入Android Studio - How Can i Import example application from developer.android.com into Android Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM