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?
