Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while running zipalign

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.

like image 293
netguy Avatar asked Jan 03 '11 02:01

netguy


People also ask

Is Zipalign necessary?

zipalign should be used to optimize your APK file before distributing it to end-users. This is done automatically if you build with Android Studio.

What is Zipalign APK?

zipalign is an archive alignment tool that provides important optimization to Android application (APK) files. The purpose is to ensure that all uncompressed data starts with a particular alignment relative to the start of the file.

Where is Zipalign located?

The zipalign file is located in build-tools in the path where Android SDK is installed.


1 Answers

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)
like image 177
J.G.Sebring Avatar answered Sep 29 '22 05:09

J.G.Sebring