Zipalign | dyld: Library not loaded: @rpath/libc++.dylib

Hi Team/ Fellow Ionic-ers.

I have a problem here of using zipalign, I followed all the steps here Android Play Store Deployment.
The issue came on the last step zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk

I got an Error

Anele-MacBook-Pro:release anele$ ./zipalign -v 4 app-release-unsigned.apk learner.apk
dyld: Library not loaded: @rpath/libc++.dylib
  Referenced from: path/to/my/android/app/build/outputs/apk/release/./zipalign
  Reason: image not found
Abort trap: 6
Anele-MacBook-Pro:release anele$ 

Like I am so bumbed-out to get stuck on the last step … Also note that all my <img /> tags point to online source like <img src="https://i.imgur.com/AlWWrSz.jpg" />

Please help and Thank You In Advance

It may seem trivial, but in the link you gave there there is no leading ./ in the call to zipalign. Whatever motivated you to add one in your invocation, I would urge you to revisit that decision.

But when I remove the ./ zipalign I get an error saying that zipalign is command not found.
So I used the fix on the link above.

It sounds like your Android SDK is not installed properly, or your environment is not configured properly to use it. I would suggest looking at official documentation. It may be as simple as adding something to your PATH, but I do Android builds on Linux, not MacOS, so I don’t have firsthand experience with this.

But I was still on the Terminal and have not imported the project on Android Studio.

Anyhow… I just wanted to update this and say that… I managed to resolve my problem with the following steps…

1 Like

You still using this approach for this problem? I am also facing the same issue and I would want to avoid using Android Studio to do it.