Gradle with Android
【Gradle with Android】
The Android Studio build system is based on Gradle, and the Android plugin for Gradle adds several features that are specific to building Android apps.
1、Update the Android Plugin for Gradle
You can specify the Android plugin for Gradle version in either the File > Project Structure > Project menu in Android Studio, or the top-levelbuild.gradle file. The plugin version applies to all modules built in that Android Studio project. The following example sets the Android plugin for Gradle to version 2.2.3 from the build.gradle file:

If the specified plugin version has not been downloaded, Gradle downloads it the next time you build your project or click Tools > Android > Sync Project with Gradle Files from the Android Studio menu bar.
2、Set the Application ID
Every Android app has a unique application ID that looks like a Java package name, such ascom.example.myapp. This ID uniquely identifies your app on the device and in Google Play Store. If you want to upload a new version of your app, the application ID (and the certificate you sign it with) must be the same as the original APK—if you change the application ID, Google Play Store treats the APK as a completely different app. So once you publish your app, you should never change the application ID.
参考:https://developer.android.com/studio/build/application-id.html#change_the_application_id_for_testing
3、Build System
参考:http://android.xsoftlab.net/tools/building/multidex.html
Gradle with Android的更多相关文章
- Gradle 实现 Android 多渠道定制化打包
Gradle 实现 Android 多渠道定制化打包 版权声明:本文为博主原创文章,未经博主允许不得转载. 最近在项目中遇到需要实现 Apk 多渠道.定制化打包, Google .百度查找了一些资料, ...
- [转]使用Gradle发布Android开源项目到JCenter
转自:http://blog.csdn.net/maosidiaoxian/article/details/43148643 使用Gradle发布Android开源项目到JCenter 分类: G ...
- 深入理解gradle编译-Android基础篇
深入理解gradle编译-Android基础篇 导读 Gradle基于Groovy的特定领域语言(DSL)编写的一种自动化建构工具,Groovy作为一种高级语言由Java代码实现,本文将对Gradle ...
- 用Gradle 构建android程序
前言 android gradle 的插件终于把混淆代码的task集成进去了,加上最近,android studio 用的是gradle 来构建项目, 下定决心把android gralde 构建项目 ...
- 使用Gradle构建Android项目
阅读目录 Gradle是什么? 环境需求 Gradle基本结构 任务task的执行 基本的构建定制 目录配置 签名配置 代码混淆设置 依赖配置 输出不同配置的应用 生成多个渠道包(以Umeng为例) ...
- 在内网使用Gradle构建Android Studio项目
在Android Studio项目中,默认的远程仓库为jcenter,如果在项目引用了一些类库,Gradle构建程序的时候会将这些依赖类库从jcenter网站下载到本地,如我们在 build.grad ...
- Gradle在Android中的基本使用
1.基本概念 程序开发作为一种工程作业,不光是编写代码,还涉及到工程的各种管理(依赖,打包,部署,发布,各种渠道的差异管理.....).很多时候,我们反复的build,clean,签名,打包,发布,那 ...
- Gradle for Android(二)全局设置、自定义BuildConfig
全局设置 如果有很多项目,可以设置全局来统一管理版本号或依赖库,根目录下build.gradle下: ext { compileSdkVersion = 23 buildToolsVersion = ...
- gradle打包android (实现外部导入签名文件、多渠道打包、导入ant脚本)
近期一直在做android自己主动打包,之前已经完毕了用纯命令行的形式打包.原生态ant脚本打包.和基于android的SDK的打包.而且实现了多渠道打包,后来同事推荐了gradle,网上的资料说gr ...
随机推荐
- android开发常用组件【持续更新中。。。】
UI相关 图片 Android-Universal-Image-Loader:com.nostra13.universalimageloader:异步加载.缓存.显示图片 ImageLoader:co ...
- 安装Linux软件时没有图形界面的问题
Q: 现在Linux下的软件有很多也采用图形界面安装了:但有时候我们发现启动安装程序时本该出现图形界面时却出现了文本界面. A: 检查常用的图形函数库(最主要的自然是gtk, qt)是否已安装.尤其是 ...
- 导入wordpress数据库到mysql报错
mysql字符集编码错误的导入数据会提示错误了,这个和插入数据一样如果保存的数据与mysql编码不一样那么肯定会出现导入乱码或插入数据丢失的问题,下面我们一起来看一个例子. 恢复数据库报错:由于字符集 ...
- var abc = function(x){} 和 function abc(x){}的区别
转自百度知道. 问:js里声明函数有几种方式? var abc = function(x){} 和 function abc(x){} 这两种声明方法有什么不同? 答:首先后者是指函数声明,前者是指函 ...
- 挂载本地ISO
http://www.linuxidc.com/Linux/2017-03/142087.htm 挂载本地ISO mount -o loop /home/iso/RHEL-server-7.0-x86 ...
- 1011 World Cup Betting (20 分)
1011 World Cup Betting (20 分) With the 2010 FIFA World Cup running, football fans the world over wer ...
- 最小化Linux系统安装
安装CentOS 5.9 基于vbox虚拟机,虚拟机内存1 G,虚拟硬盘大小8 G 虚拟网卡使用host only方式 创建卷组centos 独立的boot分区 home, root和swap分区皆是 ...
- iOS 基础
layoutSubviews: layoutSubviews是对sbuviews的重新布局,比如,我们想更新子视图的位置,可以通过调用layoutSubviews方法(不能直接调用) layoutSu ...
- 搭建MySQL高可用负载均衡集群(收藏)
https://www.cnblogs.com/phpstudy2015-6/p/6706465.html
- sqoop操作之HIVE导出到ORACLE
示例数据准备 hive中创建dept表 create table dept( deptno int, dname string, loc string ) row format delimited f ...