Skip to content
New issue

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

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

Already on GitHub? # to your account

Adding build-tools to env path #504

Open
Khader-Siddik opened this issue Jan 13, 2025 · 1 comment
Open

Adding build-tools to env path #504

Khader-Siddik opened this issue Jan 13, 2025 · 1 comment

Comments

@Khader-Siddik
Copy link

Hi,

I recently struggled with issue adding build-tools to environment path in ubuntu-latest runner. I need to sign my apk before uploading to artifact. I see there are few actions on marketplace to sign the apk but unfortunately my organisation blocks those actions providers. I tried doing it manually after setup-android job. But on trying to get the dir ‘$ANDROID_HOME/build-tools’, it fails with error that build-tools doesn’t exist. Can you help me doing this. If build-tools is installed, I will be able to grep the version and add it to the path. Then, I would be able to use zipalign and apksign to sign my unsigned apk.

Thanks

@e1732a364fed
Copy link

There's no build-tools installed by the command. I confirmed this by calling ls $ANDROID_HOME in the workflow.

However, I found a solution to install build-tools:

      - name: Setup Android build-tools
        run: |
          $ANDROID_HOME/cmdline-tools/16.0/bin/sdkmanager "build-tools;34.0.0"
          echo "$ANDROID_HOME/build-tools/34.0.0" >> "$GITHUB_PATH"

You can find this in here

Proof: successful github workflow build for android log at here

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants