Share via


Zipalign - Unable to open as zip archive

Question

Tuesday, September 17, 2013 2:06 AM

I can't seem to "zipalign" my signed apk file. I tried zipalign -f -v 4 "C:\Users\NPAX-TIMOTHY\Documents\Visual Studio 2010\Projects\Example\Example\bin\Release\com.mobi.hymnal-Signed.apk" "C:\Users\NPAX-TIMOTHY\Documents\Visual Studio 2010\Projects\Example\Example\bin\Release\MobiHymnal.apk"

result is: Unable to open 'C:\Users\NPAX-TIMOTHY\Documents\Visual Studio 2010\Projects\Example\Example\bin\Release\com.mobi.hymnal-Signed.apk' as zip archive.

Anyone help?? Thanks ahead....

All replies (5)

Wednesday, February 19, 2014 6:52 PM

Trying to follow the publishing instructions for Xamarin Studios got me the same result. Any help would be greatly appreciated.


Wednesday, February 19, 2014 11:01 PM

I don't know if this is related but when I deploy my release build (I think this is called Ad Hoc?) from the compiler to my phone the app immediately crashes. I don't get this on my debug build. Is it related to me not having the app zipaligned?


Thursday, February 20, 2014 9:27 PM

The release build crash was related to a lack of permissions, the zipalign was unable to function due to JDK being incorrectly installed on my machine. I was unable to resolve the issue but I was able to work around it by manually signing my APK in the jdk/bin folder, and then dragging that signed folder to my android folder for zipping. I'll just leave this here in case anyone else has this issue in the future. Neither are related to Xamarin in any way, my toolchain just grew far too long for my own good.


Friday, July 4, 2014 8:22 AM

Just had the same problem... This solved it for me stackoverflow.com/questions/4581770/error-while-running-zipalign


Thursday, July 24, 2014 1:42 AM

Make sure your folder is not a UNC path. After I mapped my UNC path to a drive, it worked.