Once I got the following error :
Unknown host CPU architecture: arm64
, Android NDK Silicon M1 Apple MacBook Pro
I did the following solution from stack overflow (https://stackoverflow.com/a/69555276/18491169):
Finder -> Go To Folder(/Users/mac/Library/Android/sdk/ndk/21.4.7075529) -> now edit ndk-build open it in text editor and paste below code script and re-run your project.
from
#!/bin/sh
DIR="$(cd "$(dirname "$0")" && pwd)"
$DIR/build/ndk-build "$@"
to
#!/bin/sh
DIR="$(cd "$(dirname "$0")" && pwd)"
arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"
After this NDK build file modification, I'm getting another error saying :
Cause: error=1, Operation not permitted