matiash matiash - 1 month ago 9
Android Question

GeneXus build for Android fails with "could not find <sdk>\platform-tools\zipalign.exe"

After updating to SDK Tools 23 (or newer), whenever I try to build an SD application targeting Android with GeneXus, I get the following message after compilation:

error: Could not find: <sdk>\platform-tools\zipalign.exe
Command: zipalign 4 "<path_to_apk-release-unsigned.apk>" "<path_to_apk>"
error: The system cannot find the file specified
Android Compilation Failed


Why is this?

Answer

Starting with SDK Tools 23, zipalign.exe was moved again. It is no longer in its previous location (under <sdk>\tools), but only in the subdirectories of <sdk>\build-tools.

This issue is fixed in GeneXus X Evolution 3 Upgrade 1 (as well as Evolution 2 Upgrade 7). For now, you can avoid this problem by following these steps:

  1. Make sure that at least one version of the SDK Build-tools is installed (this is necessary for building anyway).
  2. Copy the zipalign.exe file from <sdk>\build-tools\<version> to <sdk>\tools or <sdk>\platform-tools.