Error while running zipalign

netguy picture netguy · Jan 3, 2011 · Viewed 38.4k times · Source

I got this error when trying to export a signed apk in Eclipse

Error while running zipalign: Unable to open as zip archive

I have run the Help->Check for Updates to make sure the latest update is installed and SDK tools also up to date.

Answer

Tapirboy picture Tapirboy · Mar 2, 2011

I was getting the same error message. Drove me crazy until i found that my destination path was invalid.

Zipalign will give you that error even if the apk is perfectly valid, but

  • the path to the apk is invalid
  • the destination is invalid or does not exists
  • the permissions are invalid (apk is locked by other program)