androidphonegap-cli

Signing an APK in Phonegap CLI


I am remaking one of my apps as a new Phonegap project, and I am having trouble getting it to sign the APK.

In the old project, I added release-signing.properties with this info, and when I run phonegap build --release --verbose I get a prompt asking for the keystore password:

storeFile=path/to/keystore
storeType=jks
keyAlias=aliasName

I copied this file to the new project, but it doesnt prompt for the password, and I get the error com.android.ide.common.signing.KeytoolException: Failed to read key aliasName from store "path/to/keystore": Keystore was tampered with, or password was incorrect

This is the same keystore and password for both apps, and I tried adding --storePassword=... and --keyPassword=... to the command with no change.

Adding keyPassword and storePassword to release-signing.properties works, but I dont want to leave the passwords in the project like that. What can I do to get it to prompt for the password?

I am using Phonegap 6.4.4 with Android platform 6.0.0


Solution

  • Apparently this is a bug in Android platform 6.x [CB-12159] Android: Keystore password prompt won't show up - ASF JIRA

    Updating phonegap to 6.4.6 and Android platform to 6.1.2 fixed the issue

    npm install -g phonegap
    phonegap platform update android@latest