我想构建android应用并开始对其进行签名。为此,我需要发布apk的发行版。Google文档仅建议使用Eclipse和蚂蚁发布版本的方法:http : //developer.android.com/tools/publishing/app-signing.html#releasecompile
但是我找不到如何强制gradle build发行版本的apk。build.gradle
也没有给出任何提示。gradlew tasks
建议没有安装发布版本的配置,但存在卸载版本:
Install tasks
-------------
installDebug - Installs the Debug build
installTest - Installs the Test build for the Debug build
uninstallAll - Uninstall all applications.
uninstallDebug - Uninstalls the Debug build
uninstallRelease - Uninstalls the Release build
uninstallTest - Uninstalls the Test build for the Debug build
我的build.gradle
:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:13.0.+'
compile files('libs/android-support-v4.jar')
compile project(":libraries:ActionBarSherlock")
compile project(":libraries:CollabsibleSearchMenu")
}
android {
compileSdkVersion 18
buildToolsVersion "18.0.1"
defaultConfig {
minSdkVersion 8
targetSdkVersion 16
}
}
我缺少什么?
Build
->Generate Signed APK
。