Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot find zipalign.exe from android sdk

what do I need to download to get the zip-align tool to use on my apk file? I am using the ionic3 guide for developing for Android. when I type this:

zip-align -v 4 android-release-unsigned. apk HelloWorld.apk

I get:

'zip-align' is not recognized as an internal or external command,
operable program or batch file.

I want to build for google playstore

like image 370
Sam van beastlo Avatar asked Aug 25 '17 15:08

Sam van beastlo


People also ask

Could not find zipalign exe?

In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New. In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable: 'zipalign'.

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.

How does Zipalign work on android?

zipalign is a zip archive alignment tool that helps ensure that all uncompressed files in the archive are aligned relative to the start of the file. This lets the files be accessed directly via mmap(2) , removing the need to copy this data in RAM and reducing your app's memory usage.


2 Answers

You will found zipalign.exe in this location

C:\Users{username}\AppData\Local\Android\sdk1\build-tools{android-api-no}\zipalign.exe

then you need to add in your system path

Windows

Windows 10 and Windows 8 In Search, search for and then select: System (Control Panel) Click the Advanced system settings link. Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New. In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable: 'zipalign'. Click OK. Close all remaining windows by clicking OK.

more info how to change path: https://www.java.com/en/download/help/path.xml

like image 92
Prosenjit Manna Avatar answered Nov 19 '22 08:11

Prosenjit Manna


  • Download the 20.0.0 version file from this link https://androidsdkmanager.azurewebsites.net/Buildtools

  • After Extract, you can find Zipalign.exe file in it & Copy that file & paste it in tools & bin folder.

  • Restart Eclipse & thats how it works for me.

like image 43
yuvatheja Avatar answered Nov 19 '22 09:11

yuvatheja