[英]Publishing / releasing android app using phonegap
I'am trying to build the final release version of my app that using phonegap 3.0 and a few plugins. 我正在尝试使用phonegap 3.0和一些插件构建应用程序的最终发行版。 I have followed this answer on SO to link my keystore file to the app however I am not sure this is working. 我已经按照这个答案将我的密钥库文件链接到该应用程序,但是我不确定这是否有效。
Everything runs locally when I use phonegap run android
. 当我使用phonegap run android
时,一切都在本地phonegap run android
。
Into myapp/platforms/android
I have placed ant.properties
放入myapp/platforms/android
我已放置ant.properties
key.store=/Users/XXXXX/Desktop/keystore/my-release-key.keystore
key.alias=FishAppKey //I wasn't sure as it is suggested this can be whatever.
When I build my app instead of placing the .apk files into platforms/android/bin
they are put into platforms/android/ant-build
? 当我构建应用程序而不是将.apk文件放到platforms/android/bin
它们会放到platforms/android/ant-build
?
When I move into platforms/android
and run ant release
I get Build failed ...tools/ant/build.xml:698:null returned 1 当我进入platforms/android
并运行ant release
我得到Build failed ... tools / ant / build.xml:698:null返回1
Really I am trying to figure out how to go from phonegap run android
to a apk file I can upload to google play. 确实,我正在尝试弄清楚如何从phonegap run android
转到可以上传到Google Play的apk文件。
As answer to your comment, you use jarsigner and pass the full path to your keystore in the -keystore argument. 作为对您的评论的回答,您可以使用jarsigner并将完整路径传递到-keystore参数中的密钥库。 So let's say your keystore is on the desktop and named yourkeystore.keystore, 假设您的密钥库位于桌面上,并命名为yourkeystore.keystore,
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore %userprofile%\\Desktop\\yourkeystore.keystore yourappname-release-unsigned.apk youraliasforthekeystore
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore $HOME/Desktop/yourkeystore.keystore yourappname-release-unsigned.apk youraliasforthekeystore
And of course you can replace yourappname-release-unsigned.apk with the full path of your apk in case it's not in the current directory. 当然,您可以用apk的完整路径替换yourappname-release-unsigned.apk,以防它不在当前目录中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.