I am getting the following error when signing the APK in Github workflow.
Run r0adkll/sign-android-release@v1 with:
releaseDirectory: app/release signingKeyBase64: ***
alias: ***
keyStorePassword: ***
keyPassword: ***
env: JAVA_HOME_8.0.275_x64: /opt/hostedtoolcache/jdk/8.0.275/x64 JAVA_HOME: /opt/hostedtoolcache/jdk/8.0.275/x64 JAVA_HOME_8_0_275_X64: /opt/hostedtoolcache/jdk/8.0.275/x64 BUILD_TOOLS_VERSION: 30.0.2
Preparing to sign key @ app/release with signing key
**/opt/hostedtoolcache/jdk/8.0.275/x64/bin/jarsigner -keystore app/release/signingKey.jks -storepass *** -keypass *** app/release/app-release.aab *****
This is the error part: jarsigner: unable to sign jar:
java.util.zip.ZipException: invalid entry compressed size (expected 38206 but got 38984 bytes) Error: The process '/opt/hostedtoolcache/jdk/8.0.275/x64/bin/jarsigner' failed with exit code 1
I believe it's very specific to jar signer, ( I tried with the answer it fix the problem)
Update: This has happening to me as well.
You need to save your KeyStore, Alias, KeyStore Password and Key Password in the secret section inside GitHub settings.
- name: Sign AAB
id: sign
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}