Android SDK source code installation tutorial

Source: Internet
Author: User

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:

 
 
  1. tar-xvfgit-1.6.6.tar.bz2  
  2. ./configure  
  3. make  
  4. makeinstall 

(2) installation in Windows is the same as installation in other applications.

Git in Windows:

 
 
  1. 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:

 
 
  1. http://source.android.com/projects#TOC-External-projects 

Git resources for Android:

 
 
  1. http://android.git.kernel.org/ 

Git Chinese Tutorial:

 
 
  1. http://www.bitsun.com/documents/gittutorcn.htm 

Git:

 
 
  1. 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

 
 
  1. 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

 
 
  1. curlhttp://android.git.kernel.org/repo>/bin/repo  
  2. curlhttp://android.git.kernel.org/repo>~/bin/repo  
  3. chmoda+x~/bin/repo  
  4. mkdirmydroid  
  5. cdmydroid  
  6. repoinit-ugit://android.git.kernel.org/platform/manifest.git  
  7. reposync 

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

For details about how to configure this part, see

 
 
  1. 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

 
 
  1. |android.jar  
  2. +--docs/...  
  3. +--samples/...  
  4. +--sources  
  5. +--android  
  6. |...accounts,annotation,app,bluetooth,etc...  
  7. +--com/android/etc...  
  8. +--dalvik/...  
  9. +--java/...  
  10. +--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!

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.