Alex Rivera | Logout

Zipalign - Command not found - MAC terminal

Asked 2011-03-16T15:07:04.577
82

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.

Edit
Report

2 Answers

77

Perhaps the current directory is not in your path?

Try adding "./" before your command so

./zipalign -v 4 Project1.apk Project1-aligned.apk
answered 2011-03-16T15:16:54.460
2

If you are working on Windows, change the command prompt to point to the folder containing the zipalign.exe and then run the command. Also, I have found that you are not using the complete command:

zipalign [-f] [-v] 4 Input.apk Output.apk
answered 2011-03-17T06:11:51.957

Your Answer