Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zipalign not found cause signing failure #84

Open
PINAKIN-KANSARA-EY opened this issue Jan 10, 2024 · 13 comments
Open

zipalign not found cause signing failure #84

PINAKIN-KANSARA-EY opened this issue Jan 10, 2024 · 13 comments

Comments

@PINAKIN-KANSARA-EY
Copy link

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.
@donatellijl12
Copy link

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

@marat2509
Copy link

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/

@PINAKIN-KANSARA-EY
Copy link
Author

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.

@iteneum
Copy link

iteneum commented Jan 11, 2024

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.

@ghraibeh
Copy link

I have the same issue

@donatellijl12
Copy link

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!

azarz added a commit to IGNF/cartes-ign-app that referenced this issue Jan 12, 2024
@muhammadarsal
Copy link

Same issue here. It stopped working out of a sudden

@Mihier-Roy
Copy link

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

@hamz4k
Copy link

hamz4k commented Jan 12, 2024

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 }}

mueller-ma added a commit to mueller-ma/openhab.android that referenced this issue Jan 13, 2024
@yairm210
Copy link

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

mueller-ma added a commit to openhab/openhab-android that referenced this issue Jan 13, 2024
starry-shivam added a commit to Pool-Of-Tears/Myne that referenced this issue Jan 14, 2024
user5522 referenced this issue in user5522/timetable Jan 14, 2024
frimtec added a commit to frimtec/secure-sms-proxy that referenced this issue Jan 15, 2024
frimtec added a commit to frimtec/pikett-assist that referenced this issue Jan 15, 2024
cagnulein added a commit to cagnulein/QZCompanionNordictrackTreadmill that referenced this issue Jan 18, 2024
ktKongTong added a commit to ktKongTong/cm-bs-helper that referenced this issue Jan 19, 2024
Ldoppea added a commit to cozy/cozy-flagship-app that referenced this issue Jan 19, 2024
Since January 8 the  `ubuntu-latest` image excludes Android SDKs prior
to version 31

By default the `r0adkll/sign-android-release` package uses
Android SDK 29. So the build would fail

In order to fix that, we can set the `BUILD_TOOLS_VERSION` env variable
to define which version `r0adkll/sign-android-release` should use

Related doc:
https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md

Related issue: r0adkll/sign-android-release#84
Ldoppea added a commit to cozy/cozy-flagship-app that referenced this issue Jan 19, 2024
Since January 8 the  `ubuntu-latest` image excludes Android SDKs prior
to version 31

By default the `r0adkll/sign-android-release` package uses
Android SDK 29. So the build would fail

In order to fix that, we can set the `BUILD_TOOLS_VERSION` env variable
to define which version `r0adkll/sign-android-release` should use

Related doc:
https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md

Related issue: r0adkll/sign-android-release#84
Ldoppea added a commit to cozy/cozy-flagship-app that referenced this issue Jan 26, 2024
Since January 8 the  `ubuntu-latest` image excludes Android SDKs prior
to version 31

By default the `r0adkll/sign-android-release` package uses
Android SDK 29. So the build would fail

In order to fix that, we can set the `BUILD_TOOLS_VERSION` env variable
to define which version `r0adkll/sign-android-release` should use

Related doc:
https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md

Related issue: r0adkll/sign-android-release#84
meiron03 added a commit to pennlabs/penn-mobile-android that referenced this issue Jan 28, 2024
Dmitry-Borodin added a commit to novasamatech/parity-signer that referenced this issue Jan 31, 2024
Dmitry-Borodin added a commit to novasamatech/parity-signer that referenced this issue Feb 1, 2024
* fix for release flow according issue discussion
r0adkll/sign-android-release#84

* removed extra line

* hardcoded build tools to 34

* created extra step to find out latest built tools for signing apk
amberin added a commit to orgzly-revived/orgzly-android-revived that referenced this issue Feb 1, 2024
mueller-ma added a commit to mueller-ma/TabletopTools that referenced this issue Feb 3, 2024
oleksandrvolovyk added a commit to oleksandrvolovyk/guerrilla-mail-android-client that referenced this issue Feb 3, 2024
starry-shivam added a commit to Pool-Of-Tears/GreenStash that referenced this issue Feb 4, 2024
starry-shivam added a commit to Pool-Of-Tears/GreenStash that referenced this issue Feb 4, 2024
@langsmith
Copy link

@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.

TrashboxBobylev added a commit to TrashboxBobylev/Summoning-Reincarnated that referenced this issue Mar 6, 2024
flauschtrud added a commit to flauschtrud/broccoli that referenced this issue Apr 3, 2024
sffxzzp referenced this issue in kaaass/ZerotierFix Apr 11, 2024
Art-Chen added a commit to Art-Chen/MIUI-Extra-YukiAPI that referenced this issue Jun 20, 2024
Art-Chen added a commit to Art-Chen/MIUI-Extra-YukiAPI that referenced this issue Jun 20, 2024
oldkingOK added a commit to oldkingOK/HITszConnectForAndroid that referenced this issue Jul 28, 2024
oldkingOK added a commit to oldkingOK/HITszConnectForAndroid that referenced this issue Jul 28, 2024
ssense1337 added a commit to ssense1337/LADB that referenced this issue Aug 12, 2024
@rogergcc
Copy link

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/

it works thank u

@kenyee
Copy link

kenyee commented Oct 27, 2024

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 }}

This should be added to the repo's readme too...

cagnulein added a commit to cagnulein/qdomyos-zwift that referenced this issue Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests