首页 > 其他分享 >MAC M1 ndk-build ERROR: Unknown host CPU architecture: arm64

MAC M1 ndk-build ERROR: Unknown host CPU architecture: arm64

时间:2023-12-28 19:44:20浏览次数:37  
标签:bin ndk Unknown cd host M1 build DIR

{

  https://blog.csdn.net/qq_35559358/article/details/125502740

}

 

解决方法

vi编辑ndk-build

将里面的内容从

    #!/bin/sh
    DIR="$(cd "$(dirname "$0")" && pwd)"
    $DIR/build/ndk-build "$@"

修改成

    #!/bin/sh
    DIR="$(cd "$(dirname "$0")" && pwd)"
    arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"

重新运行验证

    MacBook-Pro ~ % ndk-build
    Android NDK: Could not find application project directory !    

标签:bin,ndk,Unknown,cd,host,M1,build,DIR
From: https://www.cnblogs.com/YZFHKMS-X/p/17933423.html

相关文章