Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

The terminal cannot find apksigner

Errorapksigner: command not found

Short answer

apksigner ships in the Android SDK Build-Tools package, inside the build-tools folder of your SDK, and is not placed on PATH for you. Either build-tools is not installed (or older than 24.0.3), or it is installed and its version folder is missing from PATH. Install the package with sdkmanager, then call the full path or add the folder to PATH.

  • Applies to Android SDK Build-Tools 36.0.0, Windows 11, macOS 26, Ubuntu 24.04
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Look inside your SDK's build-tools folder. If a version folder holds apksigner (apksigner.bat on Windows), the tool is installed and only PATH is wrong. If the folder is empty or missing, install it.

    # macOS example; use your own SDK path
    ls "$HOME/Library/Android/sdk/build-tools"
    ls "$HOME/Library/Android/sdk/build-tools/36.0.0" | grep -E "apksigner|zipalign"
  2. 2Match what you see, then jump to its fix

    1. 1The build-tools folder does not exist or is empty, or no version folder contains apksigner.Build-Tools is not installed, or is older than 24.0.3Fix
    2. 2ls shows apksigner in build-tools/<version>, yet typing apksigner alone fails.Build-Tools is installed but its folder is not on PATHFix

What does the error look like?

  • apksigner: command not found
  • zipalign: command not found

Cause 1 of 2

Build-Tools is not installed, or is older than 24.0.3

1Check

The Android docs say apksigner needs Build-Tools revision 24.0.3 or higher. It is a separate SDK package from platform-tools.

sdkmanager --list | grep build-tools

2Fix

Install a current Build-Tools package with sdkmanager, or update the package in Android Studio's SDK Manager.

sdkmanager "build-tools;36.0.0"

3Verify

The version folder now contains apksigner.

ls "$HOME/Library/Android/sdk/build-tools/36.0.0" | grep apksigner

Confirmed by developer.android.com

Did this fix it?

Cause 2 of 2

Build-Tools is installed but its folder is not on PATH

1Check

Build-Tools installs under <sdk>/build-tools/, one folder per version. PATH only finds the tool if you add the folder yourself.

echo "$PATH" | tr ':' '\n' | grep build-tools

2Fix

Call the tool by its full path, or add the version folder to PATH in your shell profile (on Windows, add it under Environment Variables).

# one-off
"$HOME/Library/Android/sdk/build-tools/36.0.0/apksigner" verify app-release.apk

# permanent, in ~/.zshrc or ~/.bashrc
export PATH="$PATH:$HOME/Library/Android/sdk/build-tools/36.0.0"

3Verify

Open a new terminal and ask where the command resolves.

command -v apksigner
apksigner verify app-release.apk

Confirmed by developer.android.com

Did this fix it?

How do I stop it coming back?

  • Pin the full build-tools path in release scripts and CI instead of relying on PATH.
  • Keep buildToolsVersion in your module's Gradle file in step with the version you installed.
  • Run zipalign before apksigner, because signing after alignment keeps the alignment while changing the APK afterwards breaks the signature.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

adb tcpip 5555 fails because no device is found

adb: more than one device/emulator

adb tcpip only works while the device is attached and listed by adb, because it tells the phone to start listening on port 5555.

4 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.