How to download the Android SDK source code based on Linux and Windows platform detailed _android

Source: Internet
Author: User
Tags curl mkdir git clone

This article is mainly divided into 2 parts . The 1th part describes how to download the source code for the Android SDK , and the 2nd part describes how to add the source code of the Android SDK to eclipse .

1th part How to download the Android SDK source code

1, environment. Linux 2.6, Python 2.4.3 or Windows XP

2, tools. Use the Git tool primarily to download the Android SDK source.

(1) Linux under the Git tool can be downloaded to the http://git-scm.com/, this tool is the core of Linux code management tools.

The installation process is as follows:

TAR-XVF Git-1.6.6.tar.bz2./configuremakemake Install

(2) Installation under Windows is the same as for other applications.

Windows git download address: http://code.google.com/p/msysgit/downloads/list

The latest version is: Msysgit-fullinstall-1.7.1-preview20100612.exe 31.6 MB


3, download the Android SDK source code


Windows version of Git provides two different ways to operate the Linux shell command line and GUI graphical interface.

When installed with the default installation option, the Git icon added to the desktop starts with the shell command tool, operating instructions and rules and Linux.


mkdir ANDROID_SDK_SRC set up a directory to store the Android SDK source files

CD ANDROID_SDK_SRC into the newly created directory

git clone git://android.git.kernel.org/platform/frameworks/base.git download Android SDK source

Attached Android Resource distribution Description:
Http://source.android.com/projects#TOC-External-projects
Android's git resources: http://android.git.kernel.org/
Git Chinese tutorial: http://www.bit (here parentheses only splits, the actual address is not parentheses and the contents of this bracket) sun.com/documents/gittutorcn.htm
git download Address: http://code.google.com/p/msysgit/

On http://android.git.kernel.org/'s homepage it is clear that

If you want to get some git resources (to clone one of these trees, install git, and run:), use

git clone git://android.git.kernel.org/+ project Path.git

Attach a way to download the entire Android
Repo scripts can be obtained by Http://android.git.kernel.org/repo.
Download and deploy this script using the Curl command
Curl Http://android.git.kernel.org/repo >/bin/repo

$ Curl Http://android.git.kernel.org/repo >~/bin/repo$ chmod a+x ~/bin/repo$ mkdir mydroid$ cd mydroid$ repo init-u gi t://android.git.kernel.org/platform/manifest.git$ Repo Sync

      Part 2nd How to attach the source code to eclipse.

      Detailed configuration method for this section see HTTP://STUFFTHATHAPPENS.COM/BLOG/2008/11/01/ browsing-android-source-in-eclipse/
      quotes This article as follows:

       1, in your SDK directory, that is, your Android.jar directory under the new sources directory, the download source code (my source root directory as base) in the base\ Core\java\ folders under the folder Android and COM are copied to
           placed under sources. The specific directory structure is as follows

Sdk_path
| Android.jar
+--docs/...
+--samples/...
+--sources
+--android
| ... accounts, annotation, app, Bluetooth, etc ...
+--com/android/etc ...
+--dalvik/...
+--java/...
+--javax/...

2, and then reopen eclipse, complete the source code of the additional

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.