Zipalign - Command not found - MAC terminal

When I try to run Zipalign on an apk I get the error "Command not found"

I am not that familiar with using terminal commands on the MAC but I have navigated to the SDK/Tools folder and run the following command:

zipalign -v 4 Project1.apk Project1-aligned.apk

I get Command not found

I have tried placing the apks in the Tools folder and same result.

Can someone help me to understand where the apks should be located and where I should run zipalign from?

Thanks, I am very frustrated about this as it seems so simple.


Solution 1:

Perhaps the current directory is not in your path?

Try adding "./" before your command so

./zipalign -v 4 Project1.apk Project1-aligned.apk

Solution 2:

You can find correct path with this command:

find ~/Library/Android/sdk/build-tools -name "zipalign"

Solution 3:

You will find the zipalign tool at /path/to/sdk/build-tools/<build-tools-version>/zipalign NOT in the tools folder anymore.

Solution 4:

~/Library/Android/sdk/build-tools/xxxx/zipalign

Drag this to terminal or save this in your path. xxxx -> Version