Error while running zipalign

前端 未结 18 1720
眼角桃花
眼角桃花 2021-02-06 21:48

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 Updat

相关标签:
18条回答
  • 2021-02-06 22:12

    In my case the problem was utf-8 named folder. I changed it into English and worked. I am using Windows 8 x64 Enterprise edition.

    0 讨论(0)
  • 2021-02-06 22:13

    I got this error because I had no write access to the target directory. Changing the permission accordingly resolved the problem.

    0 讨论(0)
  • 2021-02-06 22:13

    This issue occurred for me when I had my project's bin folder open in Windows Explorer.

    I then tried to delete my old apk file (which the Export tool was unsuccessfully trying to overwrite), but I couldn't do that as I didn't have the necessary permission or because some other process had a lock on the file.

    The solution was to restart my computer which released the lock on the apk file. Eclipse's Export tool then worked fine.

    Update Could not delete the old apk file in Windows Explorer or in Command window (even when I opened it with Admin rights), but I could delete the apk when viewing it in my FileZilla FTP client application. Obviously, this is much more convenient than restarting the computer.

    0 讨论(0)
  • 2021-02-06 22:13

    This is your mistake
    You are trying to set or reference zipalign first and then run zipalign -v 4 app-release-unsigned.apk HelloWorld.apk
    No, this is what you should do, set the zipalign reference and run the command at the same time
    like this
    /Users/s****/Library/Android/sdk/build-tools/28.0.3/zipalign -v 4 app-release-unsigned.apk MyApp.apk Your apk will build immediatelly.

    0 讨论(0)
  • 2021-02-06 22:15

    Check the space available on the destination disk. I got the same error because my disk was full :-)

    0 讨论(0)
  • 2021-02-06 22:17

    If the destination file already exists and it is opened by another process, then you will see this error.

    Solving method: Rename the destination file, or close the application that already opens the file.

    0 讨论(0)
提交回复
热议问题