zipalign: command not found

前端 未结 9 2035
Happy的楠姐
Happy的楠姐 2021-01-31 02:51

I\'m working on Ionic project now whereby I want to zipalign the android-release-unsigned.apk file. I followed this guide by Ionic.

When I run

相关标签:
9条回答
  • 2021-01-31 03:39

    I solved this problem by making the zipalign path an environment variable:

    export ZIPALIGN_PATH=~/Library/Android/sdk/build-tools/30.0.3/zipalign
    

    Then I replaced zipalign with $ZIPALIGN_PATH in the script I was trying to run

    0 讨论(0)
  • 2021-01-31 03:44

    If you're using Windows, the right way is to add path to zipalign.exe as PATH environment variable.

    1. Finding where zipalign.exe is located in your PC, in my case this was

    C:\Users\random-username\AppData\Local\Android\sdk1\build-tools\24.0.1

    1. Then add this location as one of the entries in your PATH environment variable.
    0 讨论(0)
  • 2021-01-31 03:51

    Solved!

    1. I copied zipalign file from my Library/Android/sdk/build-tools/21.1.2 into my Ionic project folder

    2. I add ./ in front of the zipalign command like this - ./zipalign -v 4 /Users/zulhilmizainudin/Desktop/kl-parking/platforms/android/build/outputs/apk/android-release-unsigned.apk android-release.apk

    3. Done. Now I get android-release.apk inside my Ionic project folder.

    Thanks to Michael for the solution!

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