[ 
https://issues.apache.org/jira/browse/CB-7665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14153360#comment-14153360
 ] 

Michael Brooks commented on CB-7665:
------------------------------------

Hi [~websteve],

I'm by no means an expert at Android development and I was hoping that some of 
my (stumbled by) success would help you as well!

I think it's suspicious that running {{cordova build android --release}} only 
generates:

{noformat}
/myApp/platforms/android/ant-build/myApp-release-unsigned.apk
{noformat}

When I run the same comment, it will also generate:

{noformat}
/myApp/platforms/android/ant-build/myApp-release.apk
{noformat}

Have you updated {{platforms/android/project.properties}} with your keystore 
information? In the Android [Auto Release 
Mode|http://developer.android.com/tools/building/building-cmdline.html#AutoReleaseMode]
 documentation, they explain that you must specify the keystore and alias. When 
this is done correctly, you will be prompted for your keystore password after 
running {{cordova build android --release}}.

{noformat}
# file: /myApp/platforms/android/project.properties
# your path and alias may be different from this
key.store=../../../path/to/your/myApp.keystore
key.alias=myApp
{noformat}

You can also test with the Android tooling by running:

{noformat}
$ cd myApp/platforms/android
$ ant release
{noformat}

[~bowserj] is correct that Cordova does not yet support release steps. Some 
platforms have implemented the {{--release}} flag, but there is no consistent 
way to do it on all of the platforms. Eventually that'll happen. However, 
because the Android {{--release}} flag uses {{ant release}} under the hood, we 
can get release builds happening with just a little bit of work.

> Release process for Google Play has no documentation, requires guesswork! 
> --------------------------------------------------------------------------
>
>                 Key: CB-7665
>                 URL: https://issues.apache.org/jira/browse/CB-7665
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Android, CLI, Docs
>    Affects Versions: 3.5.0
>         Environment: Mac OS X Lion
>            Reporter: Steve Husting
>              Labels: patch
>             Fix For: 3.5.0
>
>
> I output my myApp version 12 project with: cordova build android --release
> It was output as myApp/platforms/android/ant-build/myApp-release-unsigned.apk
> I changed the name to the final apk name: myApp-release-unsigned.apk = 
> myApp.apk
> I copied the myApp.keystore file used on earlier myApps to the same folder. 
> Starting with that folder, I ran: jarsigner -verbose -sigalg SHA1withRSA 
> -digestalg SHA1 -keystore myApp.keystore myApp.apk myApp
> I successfully verified it with: jarsigner -verify -verbose -certs myApp.apk
> When I uploaded the myApp.apk to Google Play, it said that the file needed to 
> be zipaligned.
> The verbose output shows zipalign being done. So is there a bug when the apk 
> is made via cordova build android --release? 
> Is there a step missing that I should be taking? Unfortunately, all the 
> instructions for this on the Internet assume I'm not using Cordova. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to