1

尝试按照这些说明 ( https://buckbuild.com/setup/getting_started.html )构建 buck 示例项目时出现以下错误。

BUILD FAILED: No native platforms detected. Probably Android NDK is not configured properly.

~/.profile 中的存储库设置

export ANDROID_NDK_REPOSITORY=/Users/tm/Library/Android/sdk/ndk-bundle

根据 ndk-bundle 目录中的 source.properties 文件的版本。

Pkg.Revision = 15.2.4203891

.buckconfig 文件中的 NDK 设置

[ndk]
ndk_version = 15.2.4203891
4

1 回答 1

1

您需要确保在运行buck命令时环境包含ANDROID_NDK_REPOSITORY变量:

echo $ANDROID_NDK_REPOSITORY

此外,/Users/tm/Library/Android/sdk/ndk-bundle目录应包含一个android-ndk-r15包含 NDK v15 的子目录,以便例如 source.properties具有以下位置:/Users/tm/Library/Android/sdk/ndk-bundle/android-ndk-r15/source.properties.

于 2017-09-22T06:22:13.070 回答