如何在 Windows 操作系统中查看 Android 源代码?

如何在 Windows 操作系统中查看 Android 源代码?

问题描述:

我试图搜索它,但我不能.我在联想 G460 笔记本电脑上运行 Windows 7.我尝试在其上安装 Ubuntu,但由于某种原因无法使用无线连接到互联网.

I try to search for it but I just cant. I am running Windows 7 on Lenovo G460 laptop. I tried to install Ubuntu on it but I cannot use Wireless to connect to the internet for some reason.

我是否可以查看 Android 源代码或至少查看其中的日历部分?

Is there anyway for me to get a look at Android source code or at least just the Calendar part of it?

您可以使用他们的 repository browser 浏览 android 源代码.如果要查看特定项目(即下载源代码),则需要获取版本控制系统 Git一>.当您运行 Git 时,您可以使用 git clone https://android.googlesource.com/projectname.git 克隆一个完整的存储库,或者只获取 HEAD(所有文件的最新版本,通过执行 git clone --depth 1 https://android.googlesource.com/projectname.git.

You can browse the android source code using their repository browser. If you want to check out a specific project (i.e. download the source), you will need to get the version control system Git. When you have Git running, you can either clone a complete repository using git clone https://android.googlesource.com/projectname.git or just get the HEAD (the most current version of all files, useful if you only want to browse through the source) by doing git clone --depth 1 https://android.googlesource.com/projectname.git.

项目名称是您在存储库浏览器上选择的顶部文件夹,例如日历应用程序的platform/packages/apps/Calendar.那么完整的命令是git clone https://android.googlesource.com/platform/packages/apps/Calendar.

The project name is the top folder you select on the repository browser, for example platform/packages/apps/Calendar for the Calendar app. Then the full command is git clone https://android.googlesource.com/platform/packages/apps/Calendar.