r0adkll/sign-android-release

zipalign not found cause signing failure

Opened this issue ยท 11 comments

Hi @r0adkll
Signing was working find until yesterday. from today is giving below error.
This is a blocking issue.

Error: Couldnt find the Android build tools @ /usr/local/lib/android/sdk/build-tools/30.0.2
Error: Unable to locate executable file: /usr/local/lib/android/sdk/build-tools/30.0.2/zipalign. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

I have this issue as well and no change was made between runs using this task.

Add env variable for use special build tools version:

      - name: Sign Release
        uses: r0adkll/sign-android-release@v1
        id: sign_app
        with:
          releaseDirectory: app/build/outputs/apk/release
          signingKeyBase64: ${{ secrets.SIGNING_KEY }}
          alias: ${{ secrets.ALIAS }}
          keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
          keyPassword: ${{ secrets.KEY_PASSWORD }}
        env:
          BUILD_TOOLS_VERSION: "34.0.0"

You can get build tools versions by

ls /usr/local/lib/android/sdk/build-tools/

Add env variable for use special build tools version:

      - name: Sign Release
        uses: r0adkll/sign-android-release@v1
        id: sign_app
        with:
          releaseDirectory: app/build/outputs/apk/release
          signingKeyBase64: ${{ secrets.SIGNING_KEY }}
          alias: ${{ secrets.ALIAS }}
          keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
          keyPassword: ${{ secrets.KEY_PASSWORD }}
        env:
          BUILD_TOOLS_VERSION: "34.0.0"

You can get build tools versions by

ls /usr/local/lib/android/sdk/build-tools/

I have done that as well, it is failing for every build tool version we set.

Add env variable for use special build tools version:

      - name: Sign Release
        uses: r0adkll/sign-android-release@v1
        id: sign_app
        with:
          releaseDirectory: app/build/outputs/apk/release
          signingKeyBase64: ${{ secrets.SIGNING_KEY }}
          alias: ${{ secrets.ALIAS }}
          keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
          keyPassword: ${{ secrets.KEY_PASSWORD }}
        env:
          BUILD_TOOLS_VERSION: "34.0.0"

You can get build tools versions by

ls /usr/local/lib/android/sdk/build-tools/

I have done that as well, it is failing for every build tool version we set.

Same here, it fails with all build tools in non hosted runners.

I have the same issue

Add env variable for use special build tools version:


      - name: Sign Release

        uses: r0adkll/sign-android-release@v1

        id: sign_app

        with:

          releaseDirectory: app/build/outputs/apk/release

          signingKeyBase64: ${{ secrets.SIGNING_KEY }}

          alias: ${{ secrets.ALIAS }}

          keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}

          keyPassword: ${{ secrets.KEY_PASSWORD }}

        env:

          BUILD_TOOLS_VERSION: "34.0.0"

You can get build tools versions by


ls /usr/local/lib/android/sdk/build-tools/

This fixed it for me. I used 34.0.0. Thanks!

Same issue here. It stopped working out of a sudden

It seems as though the default build tools version 29.0.3 doesn't exist on the ubuntu runners anymore. Specifying the version through an environment variable seems to work

Here's a small step that looks for the last available version of build tools and sets it as env variable

    - name: Setup build tool version variable
      shell: bash
      run: |
        BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
        echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
        echo Last build tool version is: $BUILD_TOOL_VERSION

You can than use it in the r0adskill step as @marat2509 suggested

      env:
        BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}

Some additional context on this since I also encountered errors - Github has indeed removed tools versions versions prior to 31

@r0adkll, please PLEASE consider adding mention of build tools to this Action's documentation. Pretty annoying that the Action's users are probably going to have to organically find their way to this single issue thread to find a fix for a basic setup.