Zipalign:command not found


#1

I have been struggling for a couple of hours on trying to fix this.
To publish my app, i had successfully run steps of the Ionic page, until reaching the “zipalign” step, I run into the error "zipalign:command not found " while trying to exectute : $ zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk

I had tried to move the zipaling.exe file from my user\AppData\Local\Android\sdk\build-tools to user\AppData\Local\Android\sdk\tools as indicated in numerous posts here and there, and also updated the build.gradle file of my app in ionicapp\platforms\android:

buildTypes {
    release {
        signingConfig signingConfigs.release
		zipAlignEnabled true 
    }
}

but nothing works, still getting error message.

Any idea pleasseeee anyone?
thanks,


#2

Try including the full path to the zipalign.exe in the command, something like this (using the path mentioned above):

user\AppData\Local\Android\sdk\build-tools\zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk

#3

hi and thanks for response @cjlaw,
well that did not do the trick, as the path is being converted in one string. However, I had found this post quite helpful and it sounds according to the console the the zipalign process had run nicely ! Will now post app to GPlay ))


#4

try this

My fix worked copying zipalign.exe from sdk\build-tools<version> to sdk\platform-tools


#5

thanks @sebastian11c it works on me.


#6

It worked for me. Thanks