174

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..

Shashank Agrawal
  • 25,161
  • 11
  • 89
  • 121
Devin Andres Salemi
  • 2,198
  • 3
  • 12
  • 25
  • 3
    Are you trying to upload a signed apk? – VishnuSP Jun 29 '17 at 04:24
  • yes, unsigned ... seems like I'm in a Catch-22 because I know I can't upload without signing, but to sign, I know it's possible to sign via google Play, but to do this, I have to already have something uploaded ... or so it seems, I am completely new to Android deployment, all I know about Android is Activities, Fragments, that sort of thing, hard to find a solid resource on deployment, pretty scattered information. – Devin Andres Salemi Jun 29 '17 at 04:40
  • 2
    If you tried to upload signed apk [here is the answer for you](https://stackoverflow.com/questions/44386464/android-app-installation-failed-package-com-my-app-has-no-certificates-at-entry/44387533#44387533) – Andy Developer Jun 29 '17 at 05:48

10 Answers10

374

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 workSee this image

Sony
  • 7,136
  • 5
  • 45
  • 68
  • 2
    I haven't explored the IDE enough to know what window that is. – Devin Andres Salemi Jun 29 '17 at 04:43
  • 4
    Go to build> generate signed apk and proceed – Sony Jun 29 '17 at 05:38
  • 17
    Don't know why, but it worked for me checking both V1 and V2. After 3-4 hours last night another 6 hours today, and checking SO, and chatting with Google Support, I don't care why anymore, just glad to move on. – jonathan3087 Jun 29 '17 at 19:51
  • 1
    If the checkboxes are disabled, set `classpath 'com.android.tools.build:gradle:2.3.0'` (or greater than 2.3.0) in your project's `build.gradle` file. – Aaron Brager Mar 30 '18 at 13:52
  • Is there a way to set this configuration in Gradle? Because I'm using a signing configuration and I don't want to manually open this dialog and check these settings every time. – ifeins Jun 10 '18 at 14:20
  • I've found that if I run a release with signing details in gradle then the Crashlytics upload doesn't run and stack traces are obfuscated...https://stackoverflow.com/questions/53420776/crashlytics-not-uploading-mapping-file/53497940#53497940 – Ewan Dec 02 '18 at 15:18
  • For anyone using Android Studio 3.3.1, just remove the Build folder. – Thyerri Mezzari Feb 20 '19 at 22:23
  • 3
    I had a problem with this, i had to first remove the apk from disk, otherwise playstore still told me the jar is not signed. – Cristi Băluță May 18 '19 at 05:32
  • 6
    This wasn't working for me. The only thing that worked was deleting the build folder and building the signed apk again as @Pablo Cegarra mentioned. – Rik van Velzen Jul 02 '19 at 13:23
  • 1
    PS: real answer is you have to delete build folder and rebuild project – qkx Aug 04 '19 at 07:05
  • Tried deleting the APK and the build folder ... still getting: `Error from apksigner: ERROR: JAR_SIG_NO_SIGNATURES: No JAR signatures` – Christopher Nov 22 '19 at 14:39
  • Cannot believe that I just had to click that first item (V1 jar signature) after trying to get this to work for hours. Thanks so much for this answer. – raddevus Dec 30 '20 at 04:58
105

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

Pablo Cegarra
  • 20,955
  • 12
  • 92
  • 110
16

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:

  1. in Android Studio, select "Build > Select build variants" and make sure that the "release" variant is selected
  2. 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].
  3. 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.
Sal Borrelli
  • 2,201
  • 19
  • 19
15
  1. Build -> Clean project
  2. Select the checkboxes for signature versions v1 and v2
Ibrahim Sušić
  • 438
  • 3
  • 20
5

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

itzo
  • 1,220
  • 14
  • 18
3

Many hints spread across the comments above but these steps are what (FINALLY) worked for my Android (Cordova) app as of 11/2019:

  1. Increment Android Build/Version Number in Manifest (if necessary)

  2. Run cordova build android

  3. Open project in Android Studio

  4. Run Build > Clean Project

  5. Run Build > Generated Signed Bundle / APK

  6. Fill out dialogs and ONLY check the "V1 JAR" sign checkbox - did not check the "V2 Full APK Signature" checkbox.

  7. Upload APK to Google Play Dashboard

  8. Cross your fingers

Christopher
  • 1,639
  • 19
  • 22
1

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

1

Make sure you're using the right certificate key file and follow these steps in Android Studio:

  1. Click Build -> Clean Project
  2. Click Build -> Generate Signed Bundle / APK
  3. 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!

David Toledo
  • 484
  • 6
  • 13
0

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...)

rsc
  • 10,348
  • 5
  • 39
  • 36
0

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.

Guilherme Oliveira
  • 916
  • 1
  • 11
  • 21