Upload new APK to Alpha - failed - android

Upload new APK to Alpha
Upload failed
You uploaded an APK with an invalid signature (learn more about
signing). Error from apksigner: ERROR: JAR_SIG_NO_SIGNATURES: No JAR
signatures
Not sure what to do, I'm just trying to make an Alpha release of an Android Studio project..

You can see from the error that there is no jar signature.Select both the checkboxes for signature versions (v1 and v2) in last step and then build the apk. It will work

I was getting this error when I updated to android studio 3.3, the solution was remove the build folder, and then try again.

I think that you probably simply accepted the default configuration settings during the APK signup process in Android Studio. This is ok most of the time, but might generate a slight confusion if you use Android 7.0+ Indeed from version 7.0, Android intruduces the new V2 Signature Scheme in addition to the "old" V1. The new scheme is supposed to offer faster app install times and more protection against unauthorized alterations to APK files, and it is therefore the default scheme in Android Studio's "Generate Signed APK" dialog box.
The problem is that Google Play in your case wants the V1 scheme to be applied, that is the JAR signing, rather than the APK signing as in V2. The Google Play documentation explicitly states that: "Although we recommend applying APK Signature Scheme v2 to your app, this new scheme is not mandatory. If your app doesn't build properly when using APK Signature Scheme v2, you can disable the new scheme.".
The solution that I have found in those cases is to enable both, as shown in the screenshot below. Once you do that the signed APK should be accepted without problems by the Google Play versions management system.
Generate Signed APK dialog box in Android Studio
This is the complete procedure:
in Android Studio, select "Build > Select build variants" and make sure that the "release" variant is selected
select "Build > Generate Signed APK" and enter the information about your keystore. I suppose that you have already created a signed APK in your previous try so these fields should be already set to the latest values. Click [Next].
the next screen is where you have to make sure to check both V1 and V2 as the signature versions, afterwards click [Finish] to generate the APK.

Build -> Clean project
Select the checkboxes for signature versions v1 and v2

It worked, when selected only V1 (Jar Signature) :-)

Many hints spread across the comments above but these steps are what (FINALLY) worked for my Android (Cordova) app as of 11/2019:
Increment Android Build/Version Number in Manifest (if necessary)
Run cordova build android
Open project in Android Studio
Run Build > Clean Project
Run Build > Generated Signed Bundle / APK
Fill out dialogs and ONLY check the "V1 JAR" sign checkbox - did not check the "V2 Full APK Signature" checkbox.
Upload APK to Google Play Dashboard
Cross your fingers

First remove your project's build folder, then generate apk or bundle again. This solution was fixed the issue for me.

Make sure you're using the right certificate key file and follow these steps in Android Studio:
Click Build -> Clean Project
Click Build -> Generate Signed Bundle / APK
Follow the steps and make sure you've selected both options in "Signature Versions" (V1 - Jar Signature and V2 - Full APK Signature)
That should work!

That error was done after I updated my Android Studio to latest version and built again.
(PS: Now I am getting the error "Your app currently targets API level 26 and must target at least API level 29 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 29" but this appears simple to solve...)

I have an updated version of Android Studio. Therefore, I don't have the option to check both v1 and v2.
Build Clean and Generate Signed Bundle/APK again worked for me.

Related

Signed APK cannot be installed on a device

Cannot install signed release APK on my phone and cannot upload it on Play Store.
I created a signed release APK with V1 and V2 JAR signatures check boxes checked. When I try to put the APK on my phone and install it gives:
App Not Installed
I double checked and I don't have the app installed with the same package name; I removed it for all users.
After no luck, I thought of uploading it to Play Store using Test Draft, but
as soon as I upload the same signed release APK, it gives me the error:
No JAR Signature.
I'm using Android Studio Version 3.3 and I'm dealing with a Play Store Jar Signature error (double checked V1 and V2 checkboxes and both are checked).
Play Store error:
Generating release APK with Android 3.3 (latest as of now) produces same error on APK installation and during the Play Store upload.
Generating signed release APK with my other system which have Android version 3.1 works fine (APK installation and Play Store upload without any errors).
It may be a fix, but still the source of the error is not found.
It looks like your APK is not signed. You can verify this locally by running the following command:
jarsigner -verify app.apk
If the app is signed (with v1 signing), it should output jar verified.
Are you sure that you are uploading the APK that is signed and not an old build or an intermediate artifact?
Try using third Party Software for Signing. That fixed it for me I was having the same issue and nothing else helped. FYI you can still use the key you generated in Android Studio.
You have to Check many factors on this issue.
add this line in your manifest. 'android:testOnly="false"'
add this line in your build.gradle app 'multiDexEnabled true'
After this all you have to open setting in your mobile allow from unknown source and also allow from source like from files or whatsapp from where you want to install this application.
check image for more understandings
enter image description here

Error while trying to upload APK to Google Play

You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR (Jar signer CERT.RSA): JAR signature META-INF/CERT.SF indicates the APK is signed using APK Signature Scheme v2 but no such signature was found. Signature stripped?
Im doing this with Cordova, signed it and then aligned it, i dont really know what im missing here..
Do alignment (if you really need it) before signing
https://developer.android.com/studio/publish/app-signing.html#signing-manually
I was facing the same problem with my Cordova project and was able to resolve it by following the steps below: (took 2 days to figure out the solution :D hope it works for anyone who lands in here.)
Import your project in AndroidStudio
Under Build Click on Generate Signed Bundle / APK
Select Android App Bundle
Update Keystore file/password and all requested details (Please select the option of the export encrypted key, as you will require to upload this on the playstore)
Select Release
Before uploading the app bundle you need to upload the certificate (the one you download in step 4)
(optional step) You will also see an auto-generated App signing key certificate you can download that if you want
Upload the App Bundle & you can now release the App to PlayStore.
I've just found that error with multiple APKs from different projects. What they had in common (from a user's perspective) was they were compiled in the same narrow time frame (within a few weeks, and about a year ago).
I've contacted the resp. developers via their corresponding Github repo. In all cases, the issue solved itself by compiling the very same code again with an updated version of Android Studio.
So if it's not the "processing order" explicitly performed by you (yes, with v2 signing must be the very last step or the signature will be broken), it might well be there was a bug in a specific version of Android Studio and, as shown, updating to the recent version and simply recompiling will solve the issue.

Cant upload a signed APK to PlayStore

I made an app and I published it on the PlayStore.
I made an update and now I'm trying to re-import it into the Android publish web site.
I generated my app like this : (with Android Studio)
Build
Generate Signed APK...
I choosed my app
Click "next"
And I used the same key, same password etc ...
The apk is succefully generated (and signed).
But when I tried to upload the app on the publish website (to update the app online) it tells me:
You have imported an APK file without a signature. You must create an APK file with a signature.
Have you got an idea why it's crashing?
It's contradincting, Android studio tells me that the signed app is generated but the website tells me it's not a signed app.
EDIT :
I tryed to "Build -> Clean Project" and "File -> Invalidate Caches / Restart..." without success. I also tryed to make a new project, copy past all code and retry :/
I assume that you're creating your keystore correctly and none of the solutions in AMAN SINGH's answer worked for you.
There's a new signing scheme in Android called Apk Signing Scheme v2.
https://source.android.com/security/apksigning/v2
When you're signing your apk there're two checkboxes.
v1 (jar signing)
v2 (apk signing)
v1 signature is required, if the APK's minSdkVersion is 23 and lower. Android versions before Android Nougat (API Level 24) ignore v2 signatures so apks which don't have a valid v1 signature will be rejected by Play Store.
In Android 7.0, APKs can be verified according to the APK Signature
Scheme v2 (v2 scheme) or JAR signing (v1 scheme). Older platforms
ignore v2 signatures and only verify v1 signatures.
Edit:
Thanks Alex Klyubin for information.
I don't understand the language in which the image is there but if you already uploaded your APK once then,
*) You need to use same signed keystore signature which you used first time at generating signed APK.
*) Check your Manifest.xml, android:debuggable="true" if this is there remove this line or make debuggable="false"
*) check `versionCode' should be greater than last uploaded
*) Check versionName should be greater than last uploaded
*) Tick Mark in both the column while building the Signed APK

Cannot install signed apk to device manually, got error "App not installed"

I'd like to publicate my app to GooglePlay but first i would like to do a last testing with the signed apk to ensure that all of the used API keys are working correctly with the release version (GMaps, Facebook, etc)
So i just made a signed version of my app with our release key and when i try to install the app to the device i got an error:
I have tried to copy the apk to the device and install it with an apk installer app.
Strange thing is when i do the same process with debug signing key, all is well, I can install and run the app.
Here are the steps of the procedure:
I select the release key, type password.
I do select release build type instead of debugging
Just in case i also defined in the gradle file the signing keys but I must admit i dont know is it necessary.
I tried like 7 seven times now so i assume this problem is not just a
mistyped password, also I can make this work with the standard debug android signing key.
Please help if you can.
You may be using the android 5.0 or above device.
May be your development version is not uninstalled properly.
Try this,
Just go to the Settings --> Apps --> Click on your App. ---> In App info page at the action bar menu there will be an option called " Uninstall for All users " click that. Your app will be completely uninstalled and now you can try installing the new version with no issue. Hope this will help you
NOTE : This is for lollipop and above.
Refer the screenshot attached.
For Current Updated Android Studio 2.3 users this answer is for you as hardly people use eclipse nowadays for Android development as Android studio has huge advancements.
So, Follow this way to create your Signed apk file.
Build > Generate Signed apk.
Create Keystore path.
Put Password, alias, key password.
Build type select accordingly(eg to release in playstore use release).
Signature Version select both V1 and V2 checkboxes.
Finsih.
Go to from explorer where you selected for the apk to store and you will see your .apk file name as app-release.apk use it.
selecting Signature Version v1 and v2 both solved the problem for me....try it
The same thing happened to me, as long as I generated my apk from Build> Build APK. I could install and un-install the apk as many times as they were without any problem, but instead if I generated the Build> Generate Signed APK, when I passed the apk to the phone and try to install it, it only allowed me one occasion, the same one that came out the following message:
until then everything was fine if I selected "INSTALL IN ANY WAY", but what happened if I uninstalled the app and wanted to reinstall it (a possible scenario), the following happened:
so I solved the problem by disabling play protect, which I achieved (within Google Play)> Menu> Play Protect> Search for security threats (disable).
"App not installed" shows when an app with same package already installed in same device. just delete your first application which you were using for testing purpose before making it to signed apk. This will work. cheers!
Select both Signature Version v1 and v2 will resolve the issue
v1 scheme
A JAR file can be signed by using the command line jarsigner tool or
directly through the java.security API. Every file entry, including
non-signature related files in the META-INF directory, will be signed
if the JAR file is signed by the jarsigner tool. For every file entry
signed in the signed JAR file, an individual manifest entry is created
for it as long as it does not already exist in the manifest
V2 scheme
v1 signatures do not protect some parts of the APK, such as ZIP
metadata. The APK verifier needs to process lots of untrusted (not yet
verified) data structures and then discard data not covered by the
signatures. This offers a sizeable attack surface. Moreover, the APK
verifier must uncompress all compressed entries, consuming more time
and memory. To address these issues, Android 7.0 introduced APK
Signature Scheme v2
By default, Android Studio 2.2 and the Android Plugin for Gradle 2.2 sign your app using both APK Signature Scheme v2 and the traditional signing scheme, which uses JAR signing.
It is recommended to use APK Signature Scheme v2 but is not mandatory.
please see the details
In Android Studio 3.0 and Above
As described here
Note: The Run button builds an APK with testOnly="true", which means the APK can only be installed via adb (which Android Studio uses). If you want a debuggable APK that people can install without adb, select your debug variant and click Build Bundle(s) / APK(s) > Build APK(s).
Add android:testOnly="false" inside Application tag in AndroidManifest.xml
Reference: https://commonsware.com/blog/2017/10/31/android-studio-3p0-flag-test-only.html
Above shubham soni answer works for me,actually it happens to android version >=5.0.In above you able to install just use this while creating your apk...
Here I resolved this issue
The reason behind this issue is, there is already an application with the same package name in the phone, but you cannot find it in phone menu(U already made the un-installation but actually its still in your phone).
To see the application go to phones SETTINGS -> APPS.
There you can see the application, but inside that the UNINSTALL button may be disabled. click on the menu overflow button to see Uninstall for all users.
After performed uninstalled for all users I have successfully installed my signed apk.
You can also use adb to uninstall the app from phone.
adb uninstall package name
In addition to this,
if your mobile supports multiple users then check if respective app is not installed for other users. If it is installed for others then first uninstall previous app and try again
I faced the same issue today, I remembered that I signed my apk with the "new" Google Play signing:
Make sure if you signed your application with Google Play signing.
If you did:
Upload your apk to Google Console (like you
usually would when updating your application):
After it has successfully uploaded, open the Artifact library in the menu.
You will see the apk you have just uploaded.
Press the download button and select Download derived APK.
You will now be able to install the apk.
You can delete the draft after have downloaded the apk without having to update your application to the Google Play Store
minifyEnabled false
is the only that worked for me after 3 days of research on all forum!
Android Studio 4.1.1
If you want to create the debug apk, and just before creating the apk you tried running on your phone/simulator (doing create signed apk right away will cause the APP NOT INSTALLED),YOU SHOULD CLEAN THE PROJECT before creating signed bundle/apk
It's quite old question, but my solution was to change versionCode (increase) in build.gradle
Go To Build.Gradle(module:app)
use this - minifyEnabled false
That may because you run APK file from external SD card storage.
Just copy APK file into internal storagem problem will be solved
This can happen due to your choice of the signature version. On some phones, installation errors occur if the signature version was selected as V2. So if that happens, try selecting V1, it will surely work.
Removing android:testOnly="true" attribute from the AndroidManifest.xml worked.
link
I am using Android 10 in MiA2. The mistake I was making is that I tried to install the app via ES Explorer. I tried Settings -> Apps & Notifications -> Advanced -> Special App Access -> Install Unknown Apps -> ES File Manage -> Allow from this source. Even then the app won't install.
Then I tired to install the app using the default File Manager and it installed easily.
The checked answer is for rooted devices, or at least it doesn't work for me.
I found a way that you can simply solve the problem by uninstall your apk from adb by using adb uninstall app.package.name (make sure that Debug app is installed on your phone)
then try to install signed apk. Hope this helps you guys.
I was facing the same issue with my android application.
I just updated a library and then created a signed APK. Now it's working.
if Your Android Studio Version Greater than 3.0
Looks like we can not directly use the apk after running on the device from the build -->output->apk folder.
After upgrading to android studio 3.0 you need to go to Build -> Build Apk(s) then copy the apk from build -> output -> apk -> debug
File > Project Structure > Build Variants > Select release > Make sure 'Signing Config' is not empty > if it is select from the drop window the $signingConfigs.release
I did this with Android Studio 3.1.4 and it allowed me to create a release apk after following all the steps above of creating the release apk and release key and adding the info to the app gradle. Cheers!
You don't have to uninstall the Google Play version if App Signing by Google Play is enabled for your app, follow the steps:
1. Make a signed version of your app with your release key
2. Go to Google Play Developer console
3. Create a closed track release (alpha or beta release) with the new signed version of your app
4. You can now download the apk signed by App Signing by Google Play, choose derived APK
Install the downloaded derived APK
The reason is App Signing by Google Play signs release apps with different keys, if you have an app installed from Play Store, and you want to test the new release version app (generated from Android Studio) in your phone, "App not installed" happens since the old version and the new version were signed by two different keys: one with App Signing by Google Play and one with your key.
Kindly uninstall the debug app in the device or just increase the version code to overcome this issues
In my case I was trying to test installing a signed APK and the current installed version on my device was unsigned (building a debug version directly from Android studio)
I tried a lot of things and the following combination worked
Clean, Rebuild
Generating a new key. I used a new key alias that had not been used before. Also, for all the passwords, I used only alphabets and numbers without any spaces or special characters
To uninstall any apk, version etc from the device, I connected my device via usb and ran the command
gradlew uninstallAll
The signed release and debug apk worked
(Note: The debug and release configurations had)
minifyEnabled false
shrinkResources false
versionCode and versionName must be greater than preview version in app level build.gradle file.

Android: Error - App has same packaged different signature

I am getting an issue where android studio is saying
Installation failed since the device has an application with the same package but a different signature. . . ..
This is correct, as I recently signed an APK and uploaded to the beta area of my play developer console.
And now I am trying to debug it locally and by default I believe that all Android projects are signed by the debug keystore hence the signatures would be different.
What is the best way to deal with this? Would it be possible to sign my debug version with my release key, and is there a potential danger here?
How would I force the signing of my debug version with my release keystore without losing the ability to debug, etc.?
Or should I just keep uninstalling and reinstalling the different versions - that seems the worst possible workaround. :-)
You can sign your apps with your release key while keeping the debugging option - you just have to add your release key into Android Studio (or specify it on the command line if you are signing your apps there).
In Android Studio, right click on your app in the project browser and open module settings. Select your app's module and click on 'Signing' to make sure your release keystore is listed. Then under 'Build Types', make sure that the debug target and the release target share the same signing config, and that the debug target has debuggable set to true. They should now share the same key.
More information on app signing can be found in the Developer docs here.
I haven't heard of a downside to using the same key for debugging and for release, provided the private key is kept secure (read: not under version control).
In my case after upgrading Android Studio, I had removed the $HOME/.android folder which made Android Studio create a new $HOME/.android/debug.keystore.
After copying the old debug.keystore it worked again.
try change debug to release in builds variants
In my case, the problem was fixed by adding the SHA-1 and SHA-256 certificate fingerprints given in Android Studio (click on Gradle on the right side of the AS window, then run configurations and signingReport) to your Firebase project settings->General->SDK setup and configuration.
By the way, this also solved the problem I was getting logging in and getting the cryptic error Activity.RESULT_CANCELED.
changing the app id in gradle files did it for me
defaultConfig {
applicationId 'com.example.app'
}

Categories

Resources