[英]How to build only single buildType with Android Studio and/or Gradle
I've several build types in my build.gradle: 我在build.gradle中有几种构建类型:
signingConfigs {
debug {
storeFile file("debug.keystore")
storePassword = "android"
keyAlias = "androiddebugkey"
keyPassword = "android"
}
unsigned{
storePassword = ""
keyAlias = ""
keyPassword = ""
}
release {
storeFile file("release.keystore")
keyAlias "alias"
storePassword "foo"
keyPassword "bar"
}
}
buildTypes {
release {
debuggable false
jniDebugBuild false
signingConfig signingConfigs.release
}
unsigned {
debuggable false
jniDebugBuild false
signingConfig signingConfigs.unsigned
}
debug {
debuggable true
jniDebugBuild true
signingConfig signingConfigs.debug
}
}
which work fine but the problem is that I don't know (and I haven't find after lot of searching) a way how to build only single build type either from Android Studio or command-line. 哪个工作正常,但问题是我不知道(我没有找到很多搜索后)如何从Android Studio或命令行构建单一构建类型的方法。
Do you please know? 你知道吗?
Documentation says ( http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Android-tasks and http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Building-and-Tasks ) that you can use the following commands to produce specific build types: 文档说( http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Android-tasks和http://tools.android.com/tech-docs/new-build -system / user-guide#TOC-Building-and-Tasks )您可以使用以下命令生成特定的构建类型:
gradle assembleDebug
gradle assembleRelease
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.