I have an app with two packages com.example.package
and com.other.package
. My configurations in build.gradle is as follows:
android {
compileSdkVersion 30
defaultConfig {
applicationId "com.example.package"
minSdkVersion 18
targetSdkVersion 30
I build an unsigned release build. Then I sign it with
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore <keystore> <OUTPUT> <ALIAS>
The build I get from this works well on all versions except for Android 11. On android 11 when I install my app I get the following error:
adb: failed to install ginger-uk.apk: Failure [-124: Failed parse during installPackageLI: Targeting R+ (version 30 and above) requires the resources.arsc of installed APKs to be stored uncompressed and aligned on a 4-byte boundary]
So I tried zip aligning the APK and installing but then I get the following error on Android 11:
App not installed error
I then tried to zipalign first before signing based on some stackoverflow solution but I get the following error on Android 11:
adb: failed to install ginger-uk.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Scanning Failed.: No signature found in package of version 2 or newer for package com.other.package]
My Question is has anyone successfully signed an APK for android 11 and below? and how do you do this?
Corrupted storage, especially corrupted SD cards, is one of the most common reasons why Android app not installed error occurs. Unwanted data might contain elements that disturb the storage location, causing Android app can't install error.
For those using MS AppCenter to do builds, you need to delete and redo the build configuration, including uploading your keystore file again. You can check for the correct signing used by looking at the log
Task : Android signing
Description : Sign and align Android APK files
Version : 3.193.0 <-- must be larger than 1.x
Source: https://github.com/microsoft/appcenter/issues/1990#issuecomment-861053082
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With