When publish android apk iget zipalign error

hi everyone, when i publish app and do this step zipalign -v 4 app-release-unsigned.apk app.apk i get this error

 zipalign -v 4 app-release-unsigned.apk app.apk
zipalign : The term 'zipalign' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1
+ zipalign -v 4 app-release-unsigned.apk afanin.apk
+ ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (zipalign:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Suggestion [3,General]: The command zipalign was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\zipalign". See "get-help about_Command_Precedence" for more details.```

my sdk is 8 and i tried to change it to 10 but nothing change

this is my ionic info


   ionic (Ionic CLI)  : 4.1.2 (C:\Users\sofe9\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0


   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-webview 2.1.3, (and 6 other plugins)


   Android SDK Tools : 26.1.1 (C:\Users\sofe9\.android\sdk)
   NodeJS            : v10.11.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.4.1
   OS                : Windows 10

1 Like

Hello. Have you resolved it already? I encounter the same problem. Huhu

It’s more than likely not in your path, as zipalign is now in a folder called “build tools”. (Someone correct me if I’m wrong)

Will you add this to your path and see if that sorts it?

export PATH=$ANDROID_HOME/build-tools/29.0.2/:$PATH

Edit: Make sure to insert whatever version you have where I have 29.0.2

1 Like