项目全局的Gradle

buildscript {    repositories {        jcenter()    }    dependencies {    //指定以来的Gradle版本        classpath 'com.android.tools.build:gradle:2.2.2'        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}allprojects {    repositories {    //制定Gradle的代码仓库        jcenter()    }}

Model gradle

//表示这个model是一个Android Application,这包括了Android项目所用到的所有工具apply plugin: 'com.android.application'//表示该model构建过程中所用到的所有参数,android {    //SDK版本    compileSdkVersion 23    //Android build tools版本    buildToolsVersion "23.0.3"    defaultConfig {        applicationId "com.pp.fanqie"        minSdkVersion 14        targetSdkVersion 23        versionCode 1        versionName "1.0"        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }    }}//表示Android model构建中所用到的依赖库dependencies {    compile fileTree(dir: 'libs', include: ['*.jar'])    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {        exclude group: 'com.android.support', module: 'support-annotations'    })    testCompile 'junit:junit:4.12'}

local.properties

这里配置了Android Gradle插件所使用的Android SDK路径。

更多相关文章

  1. SDK/ADT历史版本
  2. zxing项目源码解读(2.3.0版本,Android部分)
  3. Android(安卓)studio添加第三方类库时出现的版本不兼容问题
  4. 安卓开发38:安卓的滚动条相关属性
  5. Android(安卓)studio 连接数据库小经历遇到的问题以及解决方法(ja
  6. android 之 @ 与? 的区别
  7. scrollbarsstyle
  8. android:versionCode和android:versionName 用途
  9. Android学习笔记06:线性布局LinearLayout

随机推荐

  1. android 屏幕旋转 重新调用onCreate
  2. 搭建 Android 开发环境,初试HelloWorld (w
  3. ADB 命令大全
  4. 因占用IP地址 普林斯顿大学屏蔽Android设
  5. Android获取屏幕宽高要注意的问题
  6. Android应用程序中应用图标和名字的设置
  7. Android系统的Binder机制之四——系统Ser
  8. 图书馆座位管理系统(android,java后台,my
  9. android中使用flexboxlayout
  10. Android : RadioBotton—— 图片浏览器