个人做门户网站,网站开发项目教程,同步到wordpress,推荐购物网站建设在Windows下安装Cygwin#xff0c;通过Cygwin也可在Windows里通过本文的下载步骤下载Android源码。以下为在Ubuntu下下载Google Android4.4源码的步骤#xff1a; 1. 安装curl 与 git sudo apt-get install curl sudo apt-get install git-core 2 安装 Repo a) 建立Repo的安装…在Windows下安装Cygwin通过Cygwin也可在Windows里通过本文的下载步骤下载Android源码。以下为在Ubuntu下下载Google Android4.4源码的步骤 1. 安装curl 与 git sudo apt-get install curl sudo apt-get install git-core 2 安装 Repo a) 建立Repo的安装目录、配置环境变量 $ mkdir ~/bin $ PATH~/bin:$PATH b) 获取Repo工具 $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo ~/bin/repo 问题上面是Google制定的repo获取地址但获取可能失败。 解决办法网上有网友给出了替代的获取地址如遇报错可用下面的地址替代 curl http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo ~/bin/repo 我是使用这个可用 然后改变权限 $ chmod ax ~/bin/repo 3 建立并进入源码下载目录 $ mkdir WORKING_DIRECTORY $ cd WORKING_DIRECTORY 4 初始化源码Repo下载地址 如是下载当前最新的代码则 repo init -u https://android.googlesource.com/platform/manifest 如是下载特定Android成熟版本分支的代码则加上-b 参数如当前最新发布的android 4.4分支代码 repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.1_r1 命令如顺利执行期间将要求输入unsername和email直接输入自己的自定义的用户名和email即可。 5 同步全套源代码 $ repo sync 问题命令执行过程中可能会报错 fatal: ../platform/abi/cpp.git does not appear to be a git repository fatal: The remote end hung up unexpectedly error: Cannot fetch platform/abi/cpp 解决办法 进入WORKING_DIRECTORY显示隐藏文件可看到.repo目录并打开manifest.xml里找到fetch属性并修改为 fetch git://Android.git.linaro.org repo sync命令在执行过程中一般不会一次性成功中途可能超时或存在其他失败此时只需再次执行repo sync即可以前的记录会被缓存的。 参考文档http://www.linuxidc.com/Linux/2014-08/105310.htmAndroid 4.4.4 发布下载 http://www.linuxidc.com/Linux/2014-06/103467.htm最简单的Ubuntu Touch Android 双系统安装方式 http://www.linuxidc.com/Linux/2014-01/94881.htm在Nexus上实现Ubuntu和Android 4.4.2 双启动 http://www.linuxidc.com/Linux/2014-05/101849.htmUbuntu 14.04 配置 Android SDK 开发环境 http://www.linuxidc.com/Linux/2014-05/101039.htm64位Ubuntu 11.10下Android开发环境的搭建(JDKEclipseADTAndroid SDK详细) http://www.linuxidc.com/Linux/2013-06/85303.htmUbuntu 14.04 x64配置Android 4.4 kitkat编译环境的方法 http://www.linuxidc.com/Linux/2014-04/101148.htmUbuntu 12.10 x64 安装 Android SDK http://www.linuxidc.com/Linux/2013-03/82005.htm更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid2更多Android相关信息见Android 专题页面 http://www.linuxidc.com/topicnews.aspx?tid11本文永久更新链接地址http://www.linuxidc.com/Linux/2014-08/105323.htm转载于:https://www.cnblogs.com/dongdong230/p/4097947.html