我的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 } }
哪个工作正常,但问题是我不知道(并且我没有找到很多的搜索)一种如何仅从Android Studio或命令行构建单一构建类型的方式.
你知道吗
解决方法
文档说(
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”等命令来构建特定的buildType.