使用 Cygwin 构建 android-ndk-r17c 独立工具链

Building an android-ndk-r17c standalone toolchain with Cygwin

我想导入库 libsndfile. According to it's doc I need a standalone toolchain for this. Now I'm trying to build said toolchain with Cygwin as described in the official guide 但收到错误消息:

Unsupported platform: CYGWIN_NT-10.0.

我是 android 开发的新手,必须承认我与官方指南有很大的关系。据我了解,--arch 参数指的是我正在构建的系统,--api 参数指的是(最低?)Android 版本,它是 运行。只要它们兼容,此时究竟是哪个工具包应该无关紧要。所以现在让我们使用 --arch x86_64--api 21。总体而言,输入和输出如下所示:

$ ./build/tools/make_standalone_toolchain.py --arch x86_64 --api 21 -v --install-dir ../toolchains/oboe_record_proto/
Unsupported platform: CYGWIN_NT-10.0

这可能不是一个令人满意的答案,但最终对我有用的是:

根据 matzeri 的评论,Cygwin 不再受支持。我尝试按照建议使用 Mingw / Msys 解决它也没有成功。 因此,我在 Windows 下安装了 python 并从 Windows 命令行安装了 运行 脚本。

python .\build\tools\make_standalone_toolchain.py --arch x86_64 --api 21 -v --install-dir ..\toolchains\oboe_record_proto

工具链按预期生成。