How to download the android sdk source code on linux and windows Platforms

Source: Internet
Author: User

This article consists of two parts:. Part 1 describes how to download the source code of the android sdk. Part 2 describes how to add the source code of the android sdk to eclipse.

Part 1 how to download the source code of the android sdk

1. Environment. Linux 2.6, Python 2.4.3, or windows XP

2. Tools. Download the android sdk source using the git tool.

(1) Linux git tool can go to the http://git-scm.com/download, 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 in Windows is the same as installation in other applications.

Git: http://code.google.com/p/msysgit/downloads/list under Windows

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

3. Download the source code of the android sdk

In Windows, Git provides two different operations: Linux shell Command Line and GUI,

During installation with the default installation option, the Git icon added on the desktop is used to start the use of shell Command tools. The operation commands and usage rules are the same as those in Linux.

Mkdir android_sdk_src: create a directory for storing the Android SDK source files

Cd android_sdk_src: Enter the new directory

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

Attached Android Resource Distribution Description:
Http://source.android.com/projects#TOC-External-projects
Git resources for Android: http://android.git.kernel.org/
Git Chinese Tutorial: http://www.bit (here brackets only split, the actual address no brackets and content in this brackets) sun.com/documents/gittutorcn.htm
Git: http://code.google.com/p/msysgit/

Make it clear on the main page of http://android.git.kernel.org,

If you want To obtain some git resources (To clone one of these trees, install git, and run :),Please use

Git clone git: // android.git.kernel.org/+ project path. git

Attached is the method for downloading the entire Android
The repo script can be obtained from the http://android.git.kernel.org/repo.
Use the curl command to download and deploy this script
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 git: // android.git.kernel.org/platform/manifest.git$ repo sync

Part 3: How to append the source code to eclipse.

See the http://stuffthathappens.com/blog/2008/11/01/browsing-android-source-in-eclipse/ for detailed configuration methods for this section
This article is quoted as follows:

1. Under your SDK directory, that is, your android. create a new sources directory under the directory where the jar is located, and copy the android and com folders under the base \ core \ java \ In the downloaded source code (the root directory of my source code is base)
Put it 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. re-open eclipse and complete the source code appending.

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.