The terminal cannot find apksigner
apksigner: command not foundShort 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.
Fix it fast
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"2Match what you see, then jump to its fix
What does the error look like?
apksigner: command not foundzipalign: 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-tools2Fix
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 apksignerConfirmed by developer.android.com
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-tools2Fix
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.apkConfirmed by developer.android.com
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 cannot start because something already holds its port
adb start-server failed
The adb server must bind local TCP port 5037, and every adb client talks to it there.
2 causes, each with a fixMobile apps
adb cannot connect to its daemon or start the server
* daemon started successfully *
The adb server is a background process on your computer that listens on TCP port 5037.
2 causes, each with a fixMobile apps
adb prints 'server version doesn't match this client; killing...'
adb server version doesn't match this client; killing...
adb runs a background server, and every adb command is a client.
3 causes, each with a fixMobile 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 fixMobile apps
The Android Emulator says /dev/kvm is not found
KVM acceleration can NOT be used
The emulator wants a hypervisor and cannot find one.
4 causes, each with a fixMobile apps
The emulator says the GPU driver is unsupported and falls back to software
vulkan-1.dll cannot be found
The emulator picks a graphics mode when it starts.
4 causes, each with a fix