http://blog.csdn.net/lincyang/article/details/44680629

重要文件下载地址:

(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 
(10)http://dl-ssl.google.com/android/repository/sysimg_x86_64-22_r01.zip 
(11)http://dl-ssl.google.com/android/repository/sysimg_arm-22_r01.zip 
(12)http://dl-ssl.google.com/android/repository/haxm-windows_r05.3.zip

按照惯例,linux版本的只需将上述地址中的windows换成linux即可。

SDK目录结构

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

只需将原来的docs目录重命名,如docs-21,将最新的docs-22解压即可。文档是学习Android新feature的重要途径,一定要重视。 
2.sources 
API源码,另一个重要的学习资料。将其解压到sources目录下,最好将其api号标好,比如我这里:

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

3.samples 
例子是学习的第三个途径。将其放入samples目录下即可,如下:

    

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

4.platform 
这是sdk中的核心。将sources-22_r01.zip解压到platforms目录,如下:

    

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

5.编译工具 
tools_r24.1.2、build-tools_r22.0.1分别放到tools和build-tools下。 
6.sysimg 
有了5.1的platform我们就可以开发5.1的应用了,但是我们还缺少一个模拟器。这是sysimg要做的事情。 
将sysimg_arm-22_r01.zip解压到platform-tools目录下。

第一个Android5.1例子

build.gradle如下:

    

apply plugin: 'com.android.application'android {    compileSdkVersion 22    buildToolsVersion "21.1.2"    defaultConfig {        applicationId "com.linc.testapi22"        minSdkVersion 15        targetSdkVersion 22        versionCode 1        versionName "1.0"    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }    }}dependencies {    compile fileTree(dir: 'libs', include: ['*.jar'])    compile 'com.android.support:appcompat-v7:22.+'}


演示如下图: 
Android 5.1 SDK下载与配置_第1张图片 
Android 5.1 SDK下载与配置_第2张图片 
Android 5.1 SDK下载与配置_第3张图片 
Android 5.1 SDK下载与配置_第4张图片 
Android 5.1 SDK下载与配置_第5张图片

参考: 
http://www.cnblogs.com/warnier-zhang/p/4369647.html 
http://www.cnblogs.com/yaotong/archive/2011/01/25/1943615.html

版权声明:本文为博主原创文章,未经博主允许不得转载。

更多相关文章

  1. 《疯狂Android讲义》第二版目录
  2. Android RatingBar自定义替换系统图片
  3. 《Android/OPhone 开发完全讲义》目录
  4. android photoview 图片放大缩放功能 ImageView
  5. Android图片太大导致无法正常显示
  6. 不停地切换两张图片ViewFlipper
  7. Android第二十六课 调试模式 file.exits判断目录异常
  8. Android实现图片缩放与旋转

随机推荐

  1. android开发环境搭建之我见myeclipse8.5
  2. android监听事件添加动作的三种方式
  3. Android消息机制之四---Looper,Handler,Mes
  4. Gradle build-info.xml not found for mo
  5. Intent打开系统设置界面(action列表)
  6. android之interpolator的用法详解
  7. Android添加HelloWorldService实践
  8. Android中Message机制的灵活应用
  9. TextView添加ClickableSpan和LinkMovemen
  10. android java开发 第一天 之熟悉eclipse