Android SDKSource code installation is the content to be introduced in this article, mainly for understanding and learningAndroid SDKThis section describes how to downloadAndroid SDKThe sdk source code, instead of all the android source code, also introduces howAndroid SDKThe source code is added to eclipse, so that mobile developers on the android platform can directly view the source code. by reading the SDK source code, they can better understand and use the Android API.
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 3 describes how to download the source code of the Android SDK.
1. Environment. Linux2.6, Python2.4.3, or windowsXP
2. Tools. Download the Android SDK Source using the git tool.
1) The git tool in Linux can be downloaded at http://git-scm.com/. this tool is the core code management tool of linux.
The installation process is as follows:
- tar-xvfgit-1.6.6.tar.bz2
- ./configure
- make
- makeinstall
(2) installation in Windows is the same as installation in other applications.
Git in Windows:
- http://code.google.com/p/msysgit/downloads/list
The latest version is: msysGit-fullinstall-1.7.1-preview20100612.exe31.6MB
3. Download the source code of the Android SDK
In Windows, Git provides two different operations: Linuxshell 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.
Mkdirandroid_sdk_src: create a directory for storing the Android SDK source file
Cdandroid_sdk_src: Enter the new directory
Gitclonegit: // android.git.kernel.org/platform/frameworks/base.gitdownloadAndroid SDKSource 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.bitsun.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 Tocloneoneofthesetrees, installgit, andrun :), use
- gitclonegit://android.git.kernel.org/+projectpath.git
The method for downloading the entire Android SDK is attached.
You can run the repo script at http://android.git.kernel.org/repo.pdf.
Use the curl command to download and deploy this script
- curlhttp://android.git.kernel.org/repo>/bin/repo
- curlhttp://android.git.kernel.org/repo>~/bin/repo
- chmoda+x~/bin/repo
- mkdirmydroid
- cdmydroid
- repoinit-ugit://android.git.kernel.org/platform/manifest.git
- reposync
Part 3: How to append the source code to eclipse.
For details about how to configure this part, see
- http://stuffthathappens.com/blog/2008/11/01/browsing-android-source-in-eclipse/
This article is quoted as follows:
1. Under your SDK directory, that is, your android. create the sources directory in the directory where the jar is located and download the source code (the root directory of my source code is base) the android and com folders under base \ core \ java \ are copied to sources. The specific directory structure is as follows:
Android SDK path
- |android.jar
- +--docs/...
- +--samples/...
- +--sources
- +--android
- |...accounts,annotation,app,bluetooth,etc...
- +--com/android/etc...
- +--dalvik/...
- +--java/...
- +--javax/...
2. re-open eclipse to complete the source code appending.
Summary:Android SDKThe content of source code installation is complete.Android SDKLearning source code content can be helpful to you!