Why does an “ion cord assembly” generate unsigned agribusinesses?

I use the command below to create a signed APK, I'm sure it worked a few months ago:

$ ionic cordova build android --prod --release --keystore="./my-keystore-file.keystore" --storePassword=mypass --alias=mymail@gmail.com --password=mypass

However, only an unsigned APK is generated. How can I generate a signed APK using ionic?

+4
source share
2 answers

You need to include -- --up to Cordoba's arguments:

$ ionic cordova build android --prod --release -- -- --keystore="./my-keystore-file.keystore" --storePassword=mypass --alias=mymail@gmail.com --password=mypass

The parameters are build android --prod --releaseprocessed by the Ionic CLI, while everything after the first --is passed to the Ionic Cordova plugin. Then everything after the 2nd --is transferred to Cordoba itself.

+4
source

Publish an ionic Android app.

  • Adding a platform to the project.

ionic cordova platform add android

cordova build android --release

  1. APK platforms/android/build/outputs/apk. APK.

keytool, JDK.

keytool -genkey -v -keystore <name_of_keystore>.keystore -alias alias_name 
-keyalg RSA -keysize 2048 -validity 10000

keystore. , . . . , !

  1. unsigned APK, jarsigner, JDK:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore name_of_keystore.keystore path_to_unsigned_apk_file.apk alias_name

, apk root filename.apk .

.

  1. , zip align APK

zipalign -v 4 HelloWorld-release-unsigned.apk new_apk_name.apk

HelloWorld.apk, Google Play Store.

: docs

0

Source: https://habr.com/ru/post/1677527/


All Articles