Android 22: Android 5.1 SDK download and configuration

Source: Internet
Author: User

Important Documents:

(1) Http://dl-ssl.google.com/android/repository/sources-22_r01.zip
(2) Http://dl-ssl.google.com/android/repository/tools_r24.1.2-windows.zip
(3) Http://dl-ssl.google.com/android/repository/android-22_r01.zip
(4) Http://dl-ssl.google.com/android/repository/samples-22_r05.zip
(5) Http://dl-ssl.google.com/android/repository/build-tools_r21.1.2-windows.zip
(6) Http://dl-ssl.google.com/android/repository/build-tools_r22-windows.zip
(7) Http://dl-ssl.google.com/android/repository/build-tools_r22.0.1-windows.zip
(8) Http://dl-ssl.google.com/android/repository/docs-22_r01.zip
(9) Http://dl-ssl.google.com/android/repository/sysimg_x86-22_r01.zip
(Ten) Http://dl-ssl.google.com/android/repository/sysimg_x86_64-22_r01.zip
(one) Http://dl-ssl.google.com/android/repository/sysimg_arm-22_r01.zip
(Http://dl-ssl.google.com/android/repository/haxm-windows_r05.3.zip)

By convention, the Linux version simply replaces Windows in the above address with Linux.

SDK directory Structure
:/opt/sdk$ lsadd-ons  build-tools  docs extras  platforms  platform-tools  samples  sources  system-images  temp  tmp  tools

1.docs
Simply rename the original docs directory, such as DOCS-21, and unzip the latest docs-22. Documentation is an important way to learn about the new feature of Android, so be sure to pay attention.
2.sources
API source code, another important learning material. Unzip it into the sources directory, preferably with its API number, like here:

$ ls sources/android-14  android-15  android-16  android-17  android-18  android-19  android-21  android-22

3.samples
An example is a third way to learn. Put it in the Samples directory, as follows:

$ ls samples/android-10  android-15  android-16  android-17  android-18  android-19  android-5.1

4.platform
This is the core of the SDK. Unzip the sources-22_r01.zip to the platforms directory, as follows:

$ ls platforms/android-10  android-14  android-15  android-16  android-17  android-18  android-19  android-21  android-5.1  android-L

5. Compiling Tools
tools_r24.1.2 and build-tools_r22.0.1 are placed under tools and Build-tools respectively.
6.sysimg
With 5.1 of platform we can develop 5.1 of applications, but we still lack a simulator. This is what sysimg is going to do.
Unzip the sysimg_arm-22_r01.zip into the Platform-tools directory.

First example of Android5.1

Build.gradle as follows:

Apply plugin:' Com.android.application 'Android {Compilesdkversion ABuildtoolsversion"21.1.2"Defaultconfig {ApplicationID"Com.linc.testapi22"Minsdkversion theTargetsdkversion AVersioncode1Versionname"1.0"} buildtypes {release {minifyenabledfalseProguardfiles Getdefaultproguardfile (' Proguard-android.txt '),' Proguard-rules.pro '}}}dependencies {Compile Filetree (dir:' Libs ', include: [' *.jar ']) Compile' com.android.support:appcompat-v7:22.+ '}

Demos such as:




Reference:
Http://www.cnblogs.com/warnier-zhang/p/4369647.html
Http://www.cnblogs.com/yaotong/archive/2011/01/25/1943615.html

Android 22: Android 5.1 SDK download and configuration

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.