4

PhoneGap Build seems like a great tool and I've build an .apk with it and tested it on multiple Android devices.

Now I need to submit it to the Google Play store but I need to sign the apk.

I've read all about signing an .apk on Google's developer site but it seems that I need to install the Android development tools and use Eclipse. I've installed it but I can't find a way to import my .apk so I'm stuck.

I don't get it - what is the point of PhoneGap Build then?

This is all very disheartening. The app is ready to go but...

tshepang
  • 12,111
  • 21
  • 91
  • 136
Subjective Effect
  • 1,465
  • 2
  • 17
  • 37
  • 1
    If you [**solved the issue** by yourself](http://en.wikipedia.org/wiki/Rubber_duck_debugging) *(and confirmed the solution works)* please post the solution as an answer and [accept it](http://meta.stackexchange.com/a/5235/224130). This way, the question will be marked as answered in [the question list](http://stackoverflow.com/questions) and maybe your answer will help someone else having the same issue in the future. – Petr R. Sep 05 '13 at 15:07

3 Answers3

7

This was the solution.

I got the Android dev kit - http://developer.android.com/sdk/index.html

From there I used this video to get KeyTool: http://www.youtube.com/watch?v=IaXE2FUENFI

From there I could create a KeyStore. Make sure you keep a record of the Alias and Password (I wrote them down and did not store them on any electronic device) and the location of the keystore.

When you are in PhoneGap Build and you pull files from GitHub (which is the way I'm doing it) after the build is done you'll see there is a dropdown. Select "add a key" and upload your keystore.

Note: The keystore will usually be locked. You have to unlock it in order to build with it. It only stays unlocked for one hour.

You PhoneGap Build apk will now be appended with -release instead of the usual -debug.

It's now ready for uploading to Google Play!

Go Build! :)

Subjective Effect
  • 1,465
  • 2
  • 17
  • 37
0

I have never used PhoneGap or signed an apk, but I found this on the phonegap.com website:

https://build.phonegap.com/docs/config-signing-android

Sounds like you can just add your signing key (How to get one) to your phonegap account and when a release build of your app is made with the PhoneGap Build they sign it.

David
  • 554
  • 7
  • 9
0

You need to provide Title, Alias and a Keystore File to PhoneGap Build.

  1. Generate a private key using keytool (comes with the Java SDK - so no Eclipse required)
  2. On your next PhoneGap Build be sure to enter the Information under Options>Add a key
  3. PhoneGap Build takes care of the rest.

As far as the keytool goes, someone else gave a short & sweet description of how to...

Community
  • 1
  • 1
M.Bennett
  • 1,019
  • 1
  • 10
  • 18
  • You'll have to excuse me - I only code in HTML, CSS and JavaScript to so this is all very baffling to me. Are you saying I can create this stuff using Keytool without having to use any other part of Eclipse? – Subjective Effect Aug 23 '13 at 13:19
  • I got the Keystore plugin for Eclipse, followed a tutorial, created a keystore, tried to add it to my PhoneGap apk - error uploading. Baffled again. – Subjective Effect Aug 23 '13 at 13:48
  • I think it's working now. I had to do a LOT of searching but I've managed to generate a key and get things up on Google Play for alpha testing. Thanks for the help! – Subjective Effect Aug 23 '13 at 15:21
  • Great. If it works, add that information to your question so others looking for this solution will get to it quicker... – M.Bennett Aug 23 '13 at 15:37
  • I'll do a comprehensive solution when I get the chance. It's the weekend now and I'm away from my main workstation. I'll get back to it after the weekend. – Subjective Effect Aug 23 '13 at 22:14