You uploaded an APK with an invalid signature

Asked

Viewed 7,082 times

2

I went to put my apk on the console and gave this following error.

Sending failed You have uploaded an APK with an invalid signature. apksigner error: ERROR: JAR_SIG_NO_SIGNATURES: In JAR Signatures

I use the android ide studio, I signed the apk but it contains this at the time of sending, my manifest gets an error. I don’t know what can be.

<meta-data android:name="android.support.VERSION" android:value="26.0.0-alpha1" />
  • See if this Soen response helps you: https://stackoverflow.com/a/44816463/7762411

  • managed to solve the problem? @Renan silva das neves

  • Something happened to me when I marked the v2 signature option, when I signed it, notice if it was not the same case. If yes, select attachment v1 in the last tab to sign.

  • You need to sign the apk?

3 answers

4


Below are the steps showing how to create a key and sign a APK manually, recalling that currently the android-studio also allows you configure the build process for automatic APK signing


In the menu bar of

  1. Click on BuildGenerate Signed APK.

  2. Select a module from the drop-down list and click Next.

  3. Create or select existing key

    • Create - If you don’t have a Keystore or want to create a new one

      1. Click on Create new to create a new key and key repository.
      2. In the window New Key Store, provide the information

        • Key store path: location where the key repository should be created.
        • Password: create and confirm a secure password for the repositório de chaves
        • Alias: enter an identification name for the key.
        • Password: create and confirm a secure password for the chave. This password must be different from the password chosen for the repositório de chaves
        • Validity (years): define the validity period of the key, in years. The key needs to be valid for 25 years or longer so you can subscribe to app updates with the same key over the lifetime of the app.
        • Certificate: enter some personal information for the certificate. This information is not displayed in the app, but is included in the certificate as part of the APK.
        • After completing the form, click on OK.

    • Select - If you already have a Keystore
      (If you just created the key repository, these fields will already be filled.)

      • Key store path: Select a key repository.
      • Key store password: Enter the password of repositório de chaves.
      • Key alias: select the key
      • Key password: Enter the password of chave

      • Click on Next

  4. In the next window,

    • Select a fate for the Apks signed
    • Build Type: Select the compilation type,
    • Flavors: Choose product variations (if applicable),
    • Signature Versions: Mark the versions of the desired signature (here I usually mark all)
    • And click on Finish

imagem- ultima tela
image showing the last screen

Sources: Developer.android.com, en SO

1

open the file /Android/gradle.properties and includes the following information:

MYAPP_RELEASE_STORE_FILE=nome-da-sua-chave.keystore
MYAPP_RELEASE_KEY_ALIAS=nome-do-seu-alias
MYAPP_RELEASE_STORE_PASSWORD=*****
MYAPP_RELEASE_KEY_PASSWORD=*****

And in the archive android/app/build.gradle, include:

...
android {
    ...
    defaultConfig { ... }
    signingConfigs {
        release {
            if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
                storeFile file(MYAPP_RELEASE_STORE_FILE)
                storePassword MYAPP_RELEASE_STORE_PASSWORD
                keyAlias MYAPP_RELEASE_KEY_ALIAS
                keyPassword MYAPP_RELEASE_KEY_PASSWORD
            }
        }
    }
    buildTypes {
        release {
            ...
            signingConfig signingConfigs.release
        }
    }
}
...

0

For those who are looking for an output where the scenario is the use of the Ionic framework, I was able to fix this by changing in the config.xml file the id of my property.

<widget id="io.ionic.starter" ...

for

<widget id="br.com.pedcare" ...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.