title: App not installing in Android 11 but works on previous versions
body: <p>I have an app with two packages <code>com.example.package</code> and <code>com.other.package</code>. My configurations in build.gradle is as follows:</p>
  <pre><code>android {
      compileSdkVersion 30
      defaultConfig {
          applicationId &quot;com.example.package&quot;
          minSdkVersion 18
          targetSdkVersion 30
  
  </code></pre>
  <p>I build an unsigned release build. Then I sign it with</p>
  <pre><code>jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore &lt;keystore&gt; &lt;OUTPUT&gt; &lt;ALIAS&gt;
  </code></pre>
  <p>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:</p>
  <pre><code>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]
  </code></pre>
  <p>So I tried zip aligning the APK and installing but then I get the following error on Android 11:</p>
  <pre><code>App not installed error
  </code></pre>
  <p>I then tried to zipalign first before signing based on some stackoverflow solution but I get the following error on Android 11:</p>
  <pre><code>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]
  </code></pre>
  <p>My Question is has anyone successfully signed an APK for android 11 and below? and how do you do this?</p>