Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zipalign' is not recognized as an internal or external command

Tags:

android

I Wrote an android app. I type zipalign myApp.apk on cmd at windows 7 and I get:

zipalign' is not recognized as an internal or external command operable program or batch file

What is the problem

like image 853
user2073729 Avatar asked Apr 19 '13 07:04

user2073729


People also ask

Where can I find Zipalign?

Zipalign Command (Step-By-Step)Navigate to your program files directory and open up android-sdk> build-tools > the build-tools version you have (27.0. 3 for me). At the bottom of that folder you should see your zipalign file. Drag and drop it into the Command Prompt to have the path fill in automatically.

What is Zipalign?

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.


1 Answers

zipalign.exe can be found in the build tools (my path in my PC is C:\Users\[user name]\Developer\adt-bundle-windows-x86_64-20131030\sdk\build-tools), in my builds 19.1.0 and 20.0.0 folders. If you can't find it, fire up Windows Explorer and search for zipalign.exe, likely in C:\, unless you have installed in another drive.

Copy zipalign.exe to the tools folder, same level as build-tools (in my case, it is C:\Users\[user name]\Developer\adt-bundle-windows-x86_64-20131030\sdk\tools). Once done, I could compile successfully.

like image 81
CrackedKnife Avatar answered Sep 18 '22 11:09

CrackedKnife