Android Studio app/build.gradle使用
2016-11-22 22:10
483 查看
//使用插件
apply plugin: 'com.android.application' android { //编译SDK版本 compileSdkVersion 23 //build工具版本 buildToolsVersion "23.0.3" //默认配置 defaultConfig { //android系统中的唯一标识,一般为应用包名,如果没有显示配置此值,默认为packageName的值 //使用第三方服务时,一般会使用到应用包名就是applicationId的值,而不是manifest文件中的packageName的值 applicationId "com.anyanyan.criminalintent" //最低SDK版本,低于此值的设备不能运行该app minSdkVersion 15 //目标版本,高于此版本的设备仍可以运行。 //当实际运行设备的SDK版本等于此值时,兼容性最好 targetSdkVersion 22 //版本号,版本升级时与服务器端的版本号比较,判断是否升级应用 versionCode 1 //版本名称,一般在手机客户端显示当前版本名称 versionName "1.0" } buildTypes { release { //是否混淆 minifyEnabled true // 打包时是否去除无效的资源文件,需与minifyEnabled true配合使用 shrinkResources true //混淆的配置文件 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } //签名配置 signingConfigs { //打包时的签名配置 release { //keyStore的文件路径 storeFile file('release.keystore') //store密码 storePassword "yourstorepassword" //keyStore的alias keyAlias "yourkeyalias" //key密码 keyPassword "yourkeypassword" } //调试时的签名配置,同上release debug { storeFile file('debug.keystore') } } } //依赖 dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.2.1' compile 'com.android.support:support-v4:23.2.1' compile files('libs/Rong_IMKit.jar') }
相关文章推荐
- Android studio build.gradle配置,debug下使用正式签名,重命名apk
- IDEA / Android studio 使用gradle 编译 Failed to resolve: com.android.support:appcompat-v7:27.+
- android —— studio及eclipse工具使用记录及sdk,build-tools,gradle介绍,adb命令
- Android Studio sync build.gradle 出现:Failed to resolve: com.android.support:appcompat 问题
- AndroidStudio1.4创建项目的build.gradle(Module:app)中的配置
- Android运用Gradle build后生成的app-debug-unaligned.apk是什么?
- android android studio使用教程(五)gradle环境配置
- Android Studio使用教程(四):Gradle基础
- cocos2dx工程android-studio的build.gradle的写法
- 使用 buck 打包 Android( 使用OkBuck给Android Studio+gradle生成 buck 脚本)
- android studio使用教程(四)Gradle简单介绍
- Android Studio使用新的Gradle构建工具配置NDK环境
- Android Studio builde.gradle 配置说明
- Android Studio——boolean android.app.Activity.isFinishing()函数使用
- Android Studio Gradle Build Running 特别慢的问题
- 解决Android Studio Gradle Build Running 特别慢的问题
- android studio build.gradle中 project.ANDROID_BUILD_SDK_VERSION
- Android 使用Android Studio + Gradle 或 命令行 进行apk签名打包
- Android Studio使用教程(六):Gradle多渠道打包
- Android(java)学习笔记127:Android Studio新建工程中的build.gradle、settings.gradle