Turn off debugging for PhoneGap Build/Google Play Store Submission

Can someone tell me how I can build in PhoneGap in release mode?

I’ve gone into my project properties and there is nothing sticking out in the list to turn off debugging prior to building my native app?

You need to get distribution certificates from developer.apple.com and load them into your PhoneGap account.

It’s actually the Google Play Store - not the iStore - and I think I figured that out. I’ve looked at the video (in the wiki) and it throws up an error. I’ll try again tomorrow unless there is some other easy answer I’m missing…

C:\Program Files\Java\jdk1.8.0_181\bin>keytool -genkey -v -keystore psc.keystore -alias PincadiaScoreCentre -keyalg RSA -keysize 2048 -validity 10000
Enter keystore password:
Re-enter new password:
What is your first and last name?
  [Unknown]:  xxxx xxxx
What is the name of your organizational unit?
  [Unknown]:
What is the name of your organization?
  [Unknown]:
What is the name of your City or Locality?
  [Unknown]:  Brisbane
What is the name of your State or Province?
  [Unknown]:  Qld
What is the two-letter country code for this unit?
  [Unknown]:  AU
Is CN=xxxx xxxx, OU=Unknown, O=Unknown, L=Brisbane, ST=Qld, C=AU correct?
  [no]:  yes

Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 10,000 days
        for: CN=xxxx xxxxx, OU=Unknown, O=Unknown, L=Brisbane, ST=Qld, C=AU
Enter key password for <PincadiaScoreCentre>
        (RETURN if same as keystore password):
[Storing psc.keystore]
keytool error: java.io.FileNotFoundException: psc.keystore (Access is denied)
java.io.FileNotFoundException: psc.keystore (Access is denied)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:101)
        at sun.security.tools.keytool.Main.doCommands(Main.java:1194)
        at sun.security.tools.keytool.Main.run(Main.java:366)
        at sun.security.tools.keytool.Main.main(Main.java:359)

With this not working, I tired to use Android Studio to create my key - which I I successfully did. I imported this into my Phonegap build account against the application - went to rebuild it and it just sits there endlessly trying to build with no result.

That looks like a permissions problem.

You we’re right - it was a permission issue - I’ve run the command prompt as administrator which did allow me to create the key. I’ve imported this into my phonegap build account, rebuilt, but upon submitting it to Google I’m still getting the following errors…

#### Upload failed

You uploaded a debuggable APK or Android App Bundle. For security reasons you need to disable debugging before it can be published in Google Play. [Learn more about debuggable APKs or Android App Bundles](https://developer.android.com/studio/publish/preparing.html#publishing-configure).

You uploaded an APK or Android App Bundle that was signed in debug mode. You need to sign your APK or Android App Bundle in release mode. [Learn more about signing](http://developer.android.com/tools/publishing/app-signing.html).

You uploaded an APK or Android App Bundle with an invalid version code, a version code must be specified and should be a positive integer.

When I am ready to do a Phonegap build with AppStudio I always go to PhoneGap web site, log in, choose the current app, select my already created android key, click on the padlock symbol, type in my password (twice), by this unlocking, click Rebuild, after some time click on APK and download the release version of my apk directly from the phonegap website. Meanwhile AppStudio should be ready too with a downloadable release apk as well.


Invalid version code might be an additional issue.
Best wishes to wonderful Brisbane
Bernd Sommer

1 Like

Thanks for the help and suggestions.

Finally got it working, went right back and removed my build from PhoneGap, recreated a key and it all went through fine.

Thank you. My pleasure.

Bernd

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.