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的更多相关文章

  1. Gradle 实现 Android 多渠道定制化打包

    Gradle 实现 Android 多渠道定制化打包 版权声明:本文为博主原创文章,未经博主允许不得转载. 最近在项目中遇到需要实现 Apk 多渠道.定制化打包, Google .百度查找了一些资料, ...

  2. [转]使用Gradle发布Android开源项目到JCenter

      转自:http://blog.csdn.net/maosidiaoxian/article/details/43148643 使用Gradle发布Android开源项目到JCenter 分类: G ...

  3. 深入理解gradle编译-Android基础篇

    深入理解gradle编译-Android基础篇 导读 Gradle基于Groovy的特定领域语言(DSL)编写的一种自动化建构工具,Groovy作为一种高级语言由Java代码实现,本文将对Gradle ...

  4. 用Gradle 构建android程序

    前言 android gradle 的插件终于把混淆代码的task集成进去了,加上最近,android studio 用的是gradle 来构建项目, 下定决心把android gralde 构建项目 ...

  5. 使用Gradle构建Android项目

    阅读目录 Gradle是什么? 环境需求 Gradle基本结构 任务task的执行 基本的构建定制 目录配置 签名配置 代码混淆设置 依赖配置 输出不同配置的应用 生成多个渠道包(以Umeng为例) ...

  6. 在内网使用Gradle构建Android Studio项目

    在Android Studio项目中,默认的远程仓库为jcenter,如果在项目引用了一些类库,Gradle构建程序的时候会将这些依赖类库从jcenter网站下载到本地,如我们在 build.grad ...

  7. Gradle在Android中的基本使用

    1.基本概念 程序开发作为一种工程作业,不光是编写代码,还涉及到工程的各种管理(依赖,打包,部署,发布,各种渠道的差异管理.....).很多时候,我们反复的build,clean,签名,打包,发布,那 ...

  8. Gradle for Android(二)全局设置、自定义BuildConfig

    全局设置 如果有很多项目,可以设置全局来统一管理版本号或依赖库,根目录下build.gradle下: ext { compileSdkVersion = 23 buildToolsVersion = ...

  9. gradle打包android (实现外部导入签名文件、多渠道打包、导入ant脚本)

    近期一直在做android自己主动打包,之前已经完毕了用纯命令行的形式打包.原生态ant脚本打包.和基于android的SDK的打包.而且实现了多渠道打包,后来同事推荐了gradle,网上的资料说gr ...

随机推荐

  1. 在VS2008中加入ExtJS智能提示

    在VS2008中加入ExtJS智能提示   在VS2008中加入ExtJS智能提示—>(方法一) 关于如何在VS2008中加入ExtJS的智能提示的方法,我这里有2种方法,相对于第二种方法,第一 ...

  2. <<精通正在表达式>> 书评

     IT产业新技术日新月异,令人目不暇给,然而在这其中,真正称得上伟大东西的却寥寥无几.1998年,被誉为“软件世界的爱迪生”,发明了BSD. TCP/IP.csh.vi和NFS的SUN首席科学家Bil ...

  3. visual leak detector用法

    百度vld和windbg安装 配置symbol路径 配置环境变量 _NT_SYMBOL_PATH SRV*E:\symbols*http://msdl.microsoft.com/download/s ...

  4. bzoj3326: [Scoi2013]数数

    Description Fish 是一条生活在海里的鱼,有一天他很无聊,就开始数数玩. 他数数玩的具体规则是: 1. 确定数数的进制B 2. 确定一个数数的区间[L, R] 3. 对于[L, R] 间 ...

  5. centos1.7 配置nginx+php+mysql客户端+thinkphp的rewrite实现

    1   . 安装php7     下载地址:https://secure.php.net/downloads.php这里下载的是:wget http://ar2.php.net/distributio ...

  6. [转][Chrome]浏览器粘贴行为

    <html> <head> <meta charset="UTF-8"> <title>test chrome paste imag ...

  7. mongo获取lbs数据

    进入mongo目录执行./mongo 命令 #切换数据库use coachloc db.runCommand({geoNear : "coachloc" ,near : [113. ...

  8. IntelliJ IDEA小问题解决方法------(持续更新)

    1:IDEA运行时报错提示“找不到或无法加载主类”:在确保IDEA开发环境无误后->file->invalidate Cache/restart,之后再重新build.问题解决. 2.如何 ...

  9. Spring Security编程模型

    1.采用spring进行权限控制 url权限控制 method权限控制 实现:aop或者拦截器(本质就是之前之后进行控制)--------------------proxy就是 2.权限模型: 本质理 ...

  10. 并发工具类(五) Phaser类

    前言   JDK中为了处理线程之间的同步问题,除了提供锁机制之外,还提供了几个非常有用的并发工具类:CountDownLatch.CyclicBarrier.Semphore.Exchanger.Ph ...