gradle.properties 里面配置的东西,在gradle 文件里面可以直接引用。

例如:

在你工程根目录的gradle.properties 文件里面

可以这样配置:

## Project-wide Gradle settings.
#
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Thu Oct 26 18:42:58 CST 2017
systemProp.http.proxyHost=59.151.100.45
systemProp.http.nonProxyHosts=192.168.*
systemProp.http.proxyPort=33130 r2d2Dir=D:\\soft\\r2d22
r2d2Cmd=python ANDROID_BUILD_SDK_VERSION=27

那么在你的build.gradle 里面,你就可以:

android {
buildToolsVersion ANDROID_BUILD_SDK_VERSION

参看:http://www.cnblogs.com/if-else-if/p/5972530.html

https://docs.gradle.org/current/userguide/build_environment.html

android gradle.properties的更多相关文章

  1. React Native Android gradle下载慢问题解决

    很多人会遇到 初次运行 react-native run android的时候 gradle下载极慢,甚至会失败的问题 如下图 实际上这个问题好解决的 首先 把对应版本的gradle下载到本地任意一个 ...

  2. 配置gradle.properties

    在一些项目中会分拆app 和 lib , 这时候引用support的时候,一旦更改版本会出现需要同步更改两个地方的问题.这种情况,可以通过配置gradle.properties实现替换. 在项目编译过 ...

  3. Android Gradle 完整指南(转)

    本文转载来自:http://www.jianshu.com/p/9df3c3b6067a 为什么需要学Gradle? Gradle 是 Android 现在主流的编译工具,虽然在Gradle 出现之前 ...

  4. gradle.properties

    gradle.properties # If this is set, then multiple APK files will be generated: One per native platfo ...

  5. Android Gradle 完整指南

    为什么需要学Gradle? Gradle 是 Android 现在主流的编译工具,虽然在Gradle 出现之前和之后都有对应更快的编译工具出现,但是 Gradle 的优势就在于它是亲儿子,Gradle ...

  6. Android Gradle 指定 Module 打包

    Android Gradle 指定 Module 打包 项目中有许多的可以直接独立运行的 Module ,如何在 Gradle 中将签名文件配置好了,那么就不需要普通的手动点击 Generate Si ...

  7. Android Gradle使用总结

    转载请标明出处:http://blog.csdn.net/zhaoyanjun6/article/details/77678577 本文出自[赵彦军的博客] 其他 Groovy 使用完全解析 http ...

  8. Android Gradle defaultConfig详解及实用技巧

    实际项目中,都会应用Android Gradle Plugin,根据实际中的项目模块的职责,可以具体应用如下四种插件类型. 1,apply plugin: 'com.android.applicati ...

  9. gradle.properties使用

    设置属性 COMPILE_SDK_VERSION = 26 BUILD_TOOLS_VERSION = 26.0.0 MIN_SDK_VERSION = 19 TARGET_SDK_VERSION = ...

随机推荐

  1. 数据批量删除_从页面js到后台数据库

    LayUI   批量选择的 ,然后操作 batchdel: function () { var checkStatus = table.checkStatus('LAY-gridview') , ch ...

  2. sharepoint知识点总结

    { users.Add(value.User); } else { SPGroup group = web.Groups.GetByID(value.LookupId); groups.Add(gro ...

  3. X-Cart-5.3.1.4 (Ubuntu 16.04)

    平台: Ubuntu 类型: 虚拟机镜像 软件包: x-cart-5.3.1.4 commercial ecommerce open-source x-cart 服务优惠价: 按服务商许可协议 云服务 ...

  4. Azure进阶攻略 | VS2015和Azure,想要在一起其实很容易

    下雨天,巧克力和音乐很配…… 大冬天,男神和捧在手里的奶茶很配…… 「驴牌」的包包,和女神的全部衣服都配…… 对于「王首富」,容易实现的小目标和一个亿是绝配…… …… 醒醒吧!!这些事情和每天只会写代 ...

  5. 永恒之蓝EternalBlue复现

    0x01 漏洞原理:http://blogs.360.cn/blog/nsa-eternalblue-smb/ 目前已知受影响的 Windows 版本包括但不限于:Windows NT,Windows ...

  6. javascript当中的无限分类

    var data = [ {id:100000, name :"1", pid :0}, {id:100100, name :"1-1", pid :10000 ...

  7. POJ-2503 Babelfish---map或者hash

    题目链接: https://vjudge.net/problem/POJ-2503 题目大意: 就像查找一本字典,根据输入的条目和要查询的单词,给出查询结果(每个单词长度不超过10) 解题思路: ma ...

  8. 单调队列 poj2823,fzu1894

    题目链接:http://poj.org/problem?id=2823 用RMQ超时了,我想应该是不会的,看discuss说,之前RMQ过了. 维护两个单调队列. 单调递减的队列,每插入一个时: 超过 ...

  9. 运行时库例程-acc_get_num_devices

    格式C 或 C++: int acc_get_num_devices( acc_device_t ); 描述例程 acc_get_num_devices 返回主机上指定类型的加速器设备数量.输入参数说 ...

  10. path、classpath理解

    path.classpath最常见的场景:环境变量配置 path环境变量:设置path的作用是让操作系统可以找到JDK命令(指定了JDK命令搜索路径):path环境变量原来Windows里面就有,只需 ...