定义变量:

gradle.properties


COMPILE_SDK_VERSION=25BUILD_TOOLS_VERSION=25.0.0TARGET_SDK_VERSION=23MIN_SDK_VERSION=8


使用变量:

build.gradle中

apply plugin: 'com.android.application'android {    compileSdkVersion COMPILE_SDK_VERSION as int    buildToolsVersion BUILD_TOOLS_VERSION    defaultConfig {        minSdkVersion MIN_SDK_VERSION as int        targetSdkVersion TARGET_SDK_VERSION as int    }

更多相关文章

  1. android自定义组件
  2. Android 自定义PopupWindow动画效果
  3. Android Handler总结1-定义与用法
  4. android 自定义view 类似loadding从下往上加载的动画
  5. Android:自定义Dialog
  6. Android TextView 给文本中指定片段添加自定义点击事件
  7. Android自定义Dialog以控制其位置和宽高
  8. android 自定义对话框宽不能占满父layout的解决办法
  9. android 自定义水平的ProgressBar

随机推荐

  1. android sdk 自带的非空非空串判断方法
  2. 【android开发】android操作文件
  3. android一键清除最近应用按钮
  4. Android(安卓)APP 设置启动的第一张图片
  5. android 选择图片(从手机照相机或手机图
  6. Android(安卓)studio引入百度地图时的bug
  7. android java.lang.IllegalStateExceptio
  8. 判断Android客户端网络是否连接
  9. android clipPath切割画布
  10. React-Native 封装Android(安卓)原生控件