android studio applicationidsuffix,android studio 配置 buildTypes

Configure Build Types

You can create and configure build types in the module-level  build.gradle file inside the android {} block. When

you create a new module, Android Studio automatically creates the debug and

release build types for you. Although the debug build type doesn't appear in

the build configuration file, Android Studio configures it with debuggable true. This allows you to debug the app on secure

Android devices and configures APK signing with a generic debug keystore.

You can add the the debug build type to your configuration if you want to add

or change certain settings. The following sample specifies an applicationIdSuffix for the debug build type, and configures

a "jnidebug" build type that is initialized using settings from the

debug build type.android{...defaultConfig{...}buildTypes{release{minifyEnabledtrueproguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'}debug{applicationIdSuffix".debug"}/**

* The 'initWith' property allows you to copy configurations from other build types,

* so you don't have to configure one from the beginning. You can then configure

* just the settings you want to change. The following line initializes

* 'jnidebug' using the debug build type, and changes only the

* applicationIdSuffix and versionNameSuffix settings.

*/jnidebug{// This copies the debuggable attribute and debug signing configurations.initWith debug

applicationIdSuffix".jnidebug"jniDebuggabletrue}}}

Note: When you make changes to a build configuration file,

Android Studio requires that you sync your project with the new

configuration. To sync your project, you can click Sync Now

in the notification bar that appears as soon as you make a change or  Sync Project

sync-project.png from the toolbar. If Android

Studio notices any errors with your configuration, the  Messages window appears to describe the issue.

To learn more about all the properties you can configure with build types,

read the build type DSL reference.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值