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.
The zipalign file is located in build-tools in the path where Android SDK is installed.
Caution: You must use zipalign at one of two specific points in the app-building process, depending on which app-signing tool you use: If you use apksigner, zipalign must only be performed before the APK file has been signed.
zipalign is a zip archive alignment tool. It ensures that all uncompressed files in the archive are aligned relative to the start of the file. This allows those files to be accessed directly via mmap(2) , removing the need to copy this data in RAM and reducing your app's memory usage.
Perhaps the current directory is not in your path?
Try adding "./" before your command so
./zipalign -v 4 Project1.apk Project1-aligned.apk
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With