在 Phonegap 3.x CLI 上构建 android release apk [英] Build android release apk on Phonegap 3.x CLI
问题描述
如何使用准备发布的 Phonegap 3.x CLI 在本地构建 android 应用程序?我检查了项目的platforms/android目录下生成的bin文件夹,只有.debug APKs.
How can I build an android app locally using the Phonegap 3.x CLI, ready to release? I check the bin folder generated inside the platforms/android directory of the project, and only has .debug APKs.
顺便说一句,我用这个命令:phonegap local build android
By the way, I use this command: phonegap local build android
推荐答案
这适用于 Phonegap 3.0.x 到 3.3.x.对于 PhoneGap 3.4.0 及更高版本,请参阅下面.
在此处找到部分答案,在 Phonegap 文档中.完整流程如下:
Found part of the answer here, at Phonegap documentation. The full process is the following:
打开命令行窗口,然后转到/path/to/your/project/platforms/android/cordova.
运行 build --release
.这会在/path/to/your/project/platforms/android/bin 文件夹中创建一个未签名的发布 APK,名为 YourAppName-release-unsigned.apk.
Run build --release
. This creates an unsigned release APK at /path/to/your/project/platforms/android/bin folder, called YourAppName-release-unsigned.apk.
使用 android 开发者官方文档中的说明签署和对齐 APK.
感谢@LaurieClark 提供链接(http://iphonedevlog.wordpress.com/2013/08/16/using-phonegap-3-0-cli-on-mac-osx-10-to-build-ios-and-android-projects/),以及发布它的博主,因为它让我走上了正轨.
Thanks to @LaurieClark for the link (http://iphonedevlog.wordpress.com/2013/08/16/using-phonegap-3-0-cli-on-mac-osx-10-to-build-ios-and-android-projects/), and the blogger who post it, because it put me on the track.
这篇关于在 Phonegap 3.x CLI 上构建 android release apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!