Error registering message when downloading a new version of APK (SHA1 is not supported in API level 8)

I published the application in 2010. Then I created a local keystore and one key that I never changed or used for all of my (about 30) versions of this application that I have published since then.

I never had any problems with this, it always worked fine, back in the days when I was developing with Eclipse, nor in the last few years when I switched to Android Studio.

The latest version published on 2016-12-23. Now I wanted to publish a new one, generated a signed APK with Android Studio, uploaded it to the developer console ... and received the following error message:

Download error - you downloaded an APK with an invalid signature (more about signing). Error from apksigner: ERROR (Jar signer CERT.DSA): JAR signature. META-INF / CERT.DSA uses the SHA-1 digest algorithm and the SHA-1 signature algorithm with DSA, which is not supported at the API level 8 level for which this APK is verified

I tried these combinations (new available) versions of the signature version (always with the same result):

  • only "V1 (Jar Signature)"
  • both "V1 (Signature Jar)" and "V2 (Full Signature APK)"

I am using Android Studio 2.3.3 with buildToolsVersion 25.0.0 and Gradle version 3.3.

+4
source share
1 answer

, , , APK Android Froyo ( API 8). APK JAR (META-INF/CERT.DSA) OID 1.2.840.10040.4.3 (SHA-1 DSA), . OID Android JAR- API 9, APK AndroidManifest.xml - android:minSdkVersion - APK API- 8. DSA OID JAR - 1.2.840.10040.4.1 (DSA, SHA-1 DSA). , , OID JAR Android. , OID.

Android Studio, Android Plugin Gradle apksigner APK, . , build.gradle minSdkVersion 9 ? , , APK jarsigner, Android...

:

  • , jarsigner, apksigner Android Studio/Android Plugin Gradle . , APK apksigner:

    apksigner sign --ks my.keystore app.apk
    
  • Android Studio/Android Plugin Gradle, build.gradle minSdkVersion, AndroidManifest.xml. , , minSdkVersion build.gradle Android Studio/Android Plugin Android minSdkVersion AndroidManifest.xml? , Android Studio 2.3.3 / OID 1.2.840.10040.4.1 APK...

  • minSdkVersion AndroidManifest.xml 9 , Froyo.

. S. APK , , , Google Play :

apksigner verify my.apk
+2

Source: https://habr.com/ru/post/1687587/


All Articles