[英]How do I run my Android custom build type?
So I am trying to get my project to generate a signed and aligned apk and run it on my phone all through the Android Studio IDE. 所以我试图让我的项目生成一个签名和对齐的apk,并通过Android Studio IDE在我的手机上运行它。
My build.gradle looks like this: 我的build.gradle看起来像这样:
signingConfigs {
release {
keyAlias 'key'
keyPassword 'pwd'
storeFile file('..\\m-release-key.keystore')
storePassword 'pwd'
}
}
buildTypes {
release {
debuggable false
jniDebugBuild false
signingConfig signingConfigs.release
runProguard false
zipAlign true
}
}
The problem is that when I build, all that is getting produced is a debug-unaligned.apk, whether I click on Run or Debug, I get the same thing. 问题是,当我构建时,所有产生的都是debug-unaligned.apk,无论我点击Run还是Debug,我都会得到同样的东西。 I can't see any setting for this in Build Configurations either. 我在Build Configurations中也看不到任何设置。 How can I tell Android Studio to use my release build type? 如何告诉Android Studio使用我的发布版本类型? What am I missing? 我错过了什么?
Choose the release build variant from the Build Variants tool window, as shown: 从Build Variants工具窗口中选择发布版本变体 ,如下所示:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.