I Build a apk with phonegap cli, but problem is when I try to install apk with android phone get a Parse Error "There is a problem parsing the package"
What I try to build apk
1)phonegap create my-app com.example.myapp my-app
2)phonegap platform add android
at path /path/to/myproject/platforms/android/cordova
run command build --release
I get apk at path/myapp/platforms/android/build/outputs/apk/android-release-unsigned.apk
I tried to install this apk to my phone get error Parse Error "There is a problem parsing the package
"
As I search over net this may be problem with sign/key, I found some solutions
first command not work keytool -genkey -v -keystore [keystore_name].keystore -alias [alias_name] -keyalg RSA -keysize 2048 -validity 10000
get error
'keytool' is not recognized as an internal or external command,
operable program or batch file.
Secondly this is for online phone build but I need to create apk with cli.
This also does not suit to me.
Can anyone help me to resolve this issue Thanks in advance for help.
If your using the CLI for dev purposes just use phonegap build android --debug --device
. Your don't need to worry about any signing identity issues this way. For release builds use the other method you were using build --release
. After a release build you need to sign the android-release-unsigned.apk
before it can be put on a device.
https://developer.android.com/tools/publishing/app-signing.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With