Upload failed in play store - ionic-framework

I am unable to upload app into play store using ionic v1.... error is "Your uploaded apk or Android app bundle with invalid or missing signing info. you need to create a validly signed apk or Android app bundle.

Check your Keystore file and again generate your APK using valid keystore

GUIDE TO PUBLISH YOUR APPLICATION:
Step 1).
keytool -genkey -v -keystore “my-release-key.keystore “ –alias “alias_name” -keyalg RSA -keysize 2048 -validity 10000
· my-release-key.keystore: path to keystore
· example: D:\projects\path\to\your\project\KeystoreName.keystore
· “alias_name” : Name of your project
Step 2).
ionic cordova build --release android
Step 3).
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore D:\project\path\to\your\project/keystoreName.keystore D:\projects\path\to\your\project\platforms\android\app\build\outputs\apk\debug\app-debug.apk alias_name
Step 4). inside your sdk buildtool folder
zipalign -v 4 D:\projects\path\to\your\project\platforms\android\app\build\outputs\apk\debug\app-debug.apk D:\projects\path\to\your\project\platforms\android\app\build\outputs\apk\debug\Zipalign.apk

Related

gradlew signingreport missing keystore while getting sha 1 for release mode flutter apk

I was testing release mode of my app and the firebase auth is not working, so i google it and find out that i have to register SHA1 for release mode, and to get it we need keysotre file which i generated using command:
keytool -genkey -v -keystore release.keystore -alias AndroidReleaseKey -keyalg RSA -keysize 2048 -validity 10000
i was taking help of this documentaion: Click here
and THIS STACKOVERFLOW QUESTION
but now when i run ./gradlew signingreport i am getting this
i want the SHA1 key for release mode can anyone help me through it and also my android studio is not working fine so give me answers that doesn't require it.
Check Your Path c\file , And upgrade Project --flutter Upgrade or Update , After Retry.
I got it. The only mistake is that I put \ in store file path and when I use / instead it worked as I wanted.

Create ionic 3 app with Target SDK version 30 getting error in google play console

I am create my app in ionic v3 with Target SDK version 30
when i am upload my apk on google play console i am getting error
"You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR: MIN_SIG_SCHEME_FOR_TARGET_SDK_NOT_MET: Target SDK version 30 requires a minimum of signature scheme v2; the APK is not signed with this or a later signature scheme"
When i am making apk with Target SDK version 29 and upload on google play console its upload without any error
i don't no whay google give me an error
create sign in apk proccess are same in Target SDK version 30 or Target SDK version 29 same keystore and all command are same for create sign apk
My command are
ionic cordova build --release android
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore myappname.keystore app-release-unsigned.apk myapp
zipalign -v 4 app-release-unsigned.apk myappname.apk
Please Check what is wrong on about command and let me know it's argent my client are waiting a Target SDK version 30
After build for release -> jarsigner -> zipalign,
I just need these scripts. To sign the apk with APK Signature Scheme v2:
apksigner sign --ks yourkeystore.keystore yourapk.apk
To verify the signing
apksigner verify -v yourapk.apk
Solution
i am use this solution for ionic app only using cmd
After zipalign command success apply this command for conver sign apk with signature scheme v2
apksigner sign --v2-signing-enabled false --ks keystore name.keystore signapkname.apk
apksigner sign --ks keystore name.keystore signapkname.apk
apksigner sign --ks keystore name.keystore --ks-key-alias aliasname signapkname.apk
keytool -printcert -jarfile signapkname.apk
apksigner verify -v --print-certs signapkname.apk
apksigner verify -v signapkname.apk
I am using this as a quick fix hack
after the zipalign step is done :
zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk
I have followed this extra step:
apksigner sign --ks app.keystore --v1-signing-enabled true --v2-signing-enabled true HelloWorld.apk
Please note : use the same password you used for the keystore file.
So now you can upload your .apk file or .aab file to play store

Ionic 3 updated APK publishing failed

After uploading updated APK to play store I see this error message:
enter image description here
You are trying to upload unsigned apk to play store so you are getting this error.
Please create a singed apk with your keystore or jks then upload to play tore.
Publishing Apk
Step 1. Create Keystore (keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000)
Step 2. build apk (ionic cordova build android --prod --release)
Step 3. jarsign the unsigned apk using the keystore (jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore YOU_KEYSTORE.keystore android-release-unsigned.apk YOUR_APK_NAME)
Step 4. Zipalign the unsigned apk ( /home/USER_NAME/Android/Sdk/build-tools/25.0.2/zipalign -v 4 android-release-unsigned.apk YOUR_APK_NAME.apk )
try to add a file under platforms/android called release-signing.properties. Than fill out the data. With this the apk will be signed during every build.
storeFile=../../keystore/yourkeystore.keystore
storeType=jks
keyAlias=yourAlias
keyPassword=yourPassword
storePassword=yourStorePassword
If it's still not working than you signed the apk in the play store with a different key.
If you want to update your app then you need to sign your application with keytool you used for the initial release using that only you can update your application. Please sign the unsigned apk using the previous keytool and try to upload that apk in playstore.
Thanks for your support. problem is solved now. I deleted both .jks file and release-signing.properties from dir and created unsigned apk again.
I suppose the problem is signing two times APK.

No Java runtime present, requesting install : Mac OS, Flutter

I am trying to generate keystore file using following command.
keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
But getting following error.
No Java runtime present, requesting install.
I develop app using flutter and create APK for android, I am following below link https://flutter.io/android-release/
I don't know how to resolve this. So please help me.
/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/bin/keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
Running this command should be okay. Just tested with the latest MacOS.
Note: make sure you have installed Android Studio
You have to install Java (Runtime) in your system as Android requires the same.
Follow below steps given in the links and try to run again.
https://java.com/en/download/help/mac_install.xml
When you are generating Flutter to Android apk. What is actually happening is your code is getting converted to android code and android requires java so that's why it's complaining for java.
I hope this helps.

If keytool command was successful, do we need to do jarsigner as well?

I created a Cordova app called myApp with CLI, then immediately ran this:
keytool -genkey -v -keystore myApp.keystore -alias myApp -keyalg RSA -keysize 2048 -validity 10000
I put the keystore and apk files in the same folder. When I attempted to sign it with jarsigner with:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore myApp.keystore myApp.apk myApp
... I got the output:
jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 814 but got 818 bytes)
When I do:
jarsigner -verify -verbose -certs myApp.apk
...the output ended with:
jar verified.
This means the apk has already been signed. During the process, a "2,048 bit RSA key pair and self-signed certificate (SHA1withRSA) with a validity of 10,000 days" is created. Does that mean the present myApp.apk does not need a separate jarsigner process applied, and it is ready for Play store as is (assuming it meets all Google Play rules)?
I've been confused about the jarsigner portion of this whole process, and come to a crashing stop each time I use it. (By "jarsigner portion" I mean implementing jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore myApp.keystore myApp.apk myApp after the keytool code.)
My development environment:
Mac OS X 10.9.5 on latest Mac Mini
Cordova CLI 3.6.3 (cordova, not phonegap)
Not for PG Build; no Jquery or other JS or CSS packages used
I am not using Eclipse; I am deliberately learning how to build a signed apk without it.
Problem stems from the fact that there is a bug in the 3.6.3 version in that release code hasn't been thoroughly documented and implemented. Filed a bug report on Jira.
I assume you are following these instructions. When building your apk did you compile in release mode so that it will generate an unsigned apk? Seeing as how you are unable to sign using jarsigner, but verify that it is signed already, I feel the problem may lie with your apk.