cannot.find.zip.align=The zipalign tool was not found in the SDK.
Please update to the latest SDK and re-export your application
or run zipalign manually.
Aligning
If you are using gradle just update ypur gradle plugin!
Change line in build.gradle from:
classpath 'com.android.tools.build:gradle:0.9.+'
to:
classpath 'com.android.tools.build:gradle:0.11.+'
It works for me.
Note that variable buildToolsVersion (for me "20.0.0") must match your version of build-tools.
Good luck :)
Zipalign gradle task is deprecated since Android Plugin for Gradle, Revision 2.2.0 (September 2016).
If you want to keep using it, add android.useOldPackaging=true to your gradle.properties file.
Click here for detailed explanation.
Improves build performance by adopting a new default packaging pipeline which handles zipping, signing, and zipaligning in one task. You can revert to using the older packaging tools by adding android.useOldPackaging=true to your gradle.properties file. While using the new packaging tool, the zipalignDebug task is not available. However, you can create one yourself by calling the createZipAlignTask(String taskName, File inputFile, File outputFile) method. APK signing now uses APK Signature Scheme v2 in addition to traditional JAR signing. All Android platforms accept the resulting APKs. Any modification to these APKs after signing invalidates their v2 signatures and prevents installation on a device. Blockquote
I fixed it by uninstalling Android SDK Platform (4.4W) and then reinstalling it. I also restarted Eclipse after the installation.
When I was completely desperate, I did the following, that allowed me to find official zipalign.exe. The short answer is to use the link from official (but not public :-) part of of the site:
https://dl.google.com/android/repository/build-tools_r28-rc1-windows.zip
If you use this recepy after 2018, you probably need the full explanation:
Open Android Studio and go
Android Studio->Tools->Android->SDK Manager->Android SDK->SDK update site
Write in text editor link and open it in the browser. In my case the first link worked for me:
https://dl.google.com/android/repository/repository2-1.xml
Look for the latest package build-tools. In my case, it was build-tools_r28-rc1-windows.zip, but you can find the latest in your time
Ctrl+F build-tools_
Substitute in the URL the last part with the found package name like I did:
https://dl.google.com/android/repository/build-tools_r28-rc1-windows.zip
Download the package, unzip it and fortunately find official file:
zipalign.exe
If it helps you, your feedback is wellcome.
I use Eclipse and this broke during an update. Here's what worked for me as the answers above did not.
I checked where ant's build.xml expected to find zipalign.exe.
In: C:\Development\Android\android-sdk\tools\ant\build.xml
zipalign is defined as:
<property name="zipalign" location="${android.build.tools.dir}/zipalign${exe}" />
which indicates its expected in:
C:\Development\Android\android-sdk\build-tools\18.0.1
This directory corresponds to the highest version of the 'Android SDK Build-tools' displayed as installed in the 'Android SDK Manager'. So, that's where I copied zipalign.exe (which I obtained from an Android Studio installation!) and signed apps are now automatically zipaligned again!
Normally the zipalign.exe is close of the "Android manager"(also, "Android", "Android SDK" etc), so you can search for "Android Manager" in windows search and give a righ-click above the command and open file location. You probably are in: something\ Android\android-sdk\tools. Then is just necessary return a folder and go to Android\android-sdk\build-tools\23.0.3. The zipalign is there, you maybe be not able to use it with double-click, so you have to copy all the path of the zipalign file to use in CMD, the final code that you have to input will be something like:
C:\Users\heitor\AppData\Local\Android\android-sdk\build-tools\23.0.1\zipalign.exe -v 4 android.apk android2.apk