Android - Update app with new APK sign error - android

Long story short: 2 years ago I had someone create a app for me, this was coded in Xamrian and uploaded through AppCenter.ms(I think). Now, 2 years later I want to update that app. I rewrote the whole app in Java using Android Studio, and I am trying to upload a new version of the app in Google Play Console. I am trying to upload a signed apk, by using Generate Signed Bundle / APK. The problem is that I do not have the "key store" from the first upload, so when trying to upload the new apk(with a new keystore), this is what happens.
Error message:
You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR: JAR_SIG_NO_SIGNATURES: No JAR signatures.
What can I do about this? Is there any workaround so I can upload a new version of my app?

You can not update an app with an APK / App Bundle which is signed with a different key.
The Google Play Store will prevent the upload.
If you try to install it locally over an existing app, Android will show an error (something like "App could not be installed").

Related

Rebuilding the apk file with the different ID and/or Key : Native Script

I have a requirement to upload an apk file to a newly created app in my Goolge Play Console. However there is already another older version of the same app under a different name in my Play Console.
When I try to upload the apk file I get the following error.
"You uploaded an APK or Android App Bundle that is signed with a key
that is also used to sign APKs that are delivered to users. Because
you are enrolled in App Signing by Google Play, you should sign your
APK or Android App Bundle with a new key before you upload it."
I have tried changing the ID of the app in the package.json file but it did not make any difference.
if I try to change app.gradle and deleted some auto generated files which had the old APP ID and rebuild it. But then I get the above error.
Any suggestions to fix this issue

Google Console APK Upload - New App fails

Recently trying to create a new App and upload a brand new APK with self signed certificate (Not Google App Signing) Results in the following error
You uploaded an APK or Android App Bundle that is signed with a restricted certificate. You need to upload an APK or Android App Bundle signed with your own certificate.
I don't believe this error is entirely correct as I do sign the certificate myself locally, this seems like a recent change to our on boarding process and opt-in is now default for google app signing but our infrastructure doesn't have the right pipeline for this yet.
Is there any other things to verify and test, as I see the keystone file is still there and there's no build errors when it's being signed. Also this is a brand NEW application I don't understand why this error would occur for the initial upload since there's no other keys to check against.
I've searched the net but most issues appear to be happening in 2018 and this is more of a recent change that started to occur for us.
EDIT: This is using Cordova build tools not through Android Studio.
Try to follow these trouble shoot steps and see if that will solve your issue:
Clear everything in the Release folder, present in app->build->outputs->apk->release.
Generate new signed apk which will get created in the same above mentioned directory.
Make sure you are bumping the version code.
I don't have a full answer as to Why it was failing, however right after the build for cordova build android --release that APK will upload. But If I use that APK in an emulator to test something first that APK is no longer valid to upload and I get the error pasted above.
basically in our pipeline I had to create a copy of the APK right before creating screenshots and then use the copied APK to upload onto google console.

Signed app won't upload on Play Store with Jenkins (Upload failed: - Forbidden) but it works if I do it manually on the Play Console

I'm using Jenkins and the Google Play Android Publisher plugin to upload all my other apps.
I have uploaded a new app, and I was required to make a new keystore because the one I was using didn't match the security requirements.
If I build a bundle with Android Studio with that keystore and upload it, it works, but not if I upload it with Jenkins.
The only other difference beside keystore is that this app is uploaded on another company's Google account, using the same dev account as my other apps.
Here is my error message (I get this warning with my other apps too).
Warning: The signer's certificate is self-signed. Authenticating to
Google Play API...
- Credential: Google Play Android Developer
- Application ID: com.company.myapp
Upload failed:
- Forbidden
All the APKs uploaded for an app need to be signed with the same keystore. This is required because the Android platform will refuse to update an APK if it is signed with a different key.
Ensure that Jenkins references the same keystore as the one you use when building with Studio (or whichever keystore you said works).

VS2019 - Google Play Console error - Failed to sign a app bundle

I am using Visual Studio 2019 16.4.1. I am trying to put a app onto the Google Play Store in internal testing. My app is being bundle as a aab file. I am getting a upload failed message:
"You uploaded an APK or Android App Bundle with invalid or missing signing information for some of its files. You need to create a valid signed APK or Android App Bundle. Learn more about signing."
I also saw this message which might indicate a bug with VS.
https://developercommunity.visualstudio.com/content/problem/845978/you-uploaded-an-apk-or-android-app-bundle-with-inv.html?inRegister=true
Now my question is how can you poke around inside the aab file and see if it is properly signed?
Also if it isn't signed...is it possible to sign that aab file and how would you do that?

Is it mandatory to upload aab(Android App Bundle) instead of APK file

In the recent try for uploading a new version of apk for existing application to PlayStore, threw an warning message as mentioned below
So the question is, is it mandatory to upload only aab files to PlayStore or normal apk file can also be updated.
If aab file has to be uploaded, then how to sign the aab file before uploading.
I referred this Link for Goolge App signing. Is this also required ?
Note:
The application developed is a cordova application. So if the above mentioned things are mandatory is the procedure different to build for cordova application ?
Thanks in advance !
"Important: In the second half of 2021, new apps will be required to
publish with the Android App Bundle on Google Play. New apps larger
than 150 MB must use either Play Feature Delivery or Play Asset
Delivery".
Taken from
https://developer.android.com/guide/app-bundle
So the question is, is it mandatory to upload only aab files to PlayStore or normal apk file can also be updated
Normal APK can also be uploaded / updated. This is just a warning and not an error message. Google Play will still allow you to continue
If aab file has to be uploaded, then how to sign the aab file before
uploading.
In Android Studio, when building signed APK / AAB, it will ask you to export an encrypted key. Take note of the location because you will use this exported key when you upload your AAB. See highlighted in yellow
I referred this Link for Goolge App signing. Is this also required ?
Nope, it's optional. Quoting Google Play Support:
Using app signing by Google Play is optional. You can still upload an APK and manage your own keys instead of using an app bundle. However, if you lose your keystore or it becomes compromised, you won’t be able to update your app without publishing a new app with a new package name. https://support.google.com/googleplay/android-developer/answer/7384423

Categories

Resources