Android BUCK build error

489 Views Asked by At

I am getting the following error when trying to build the buck sample project following these instructions (https://buckbuild.com/setup/getting_started.html).

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

Repository setup in ~/.profile

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

Version according to source.properties file in ndk-bundle directory.

Pkg.Revision = 15.2.4203891

NDK setup in .buckconfig file

[ndk]
ndk_version = 15.2.4203891
1

There are 1 best solutions below

0
On

You need to make sure that when you run buck command the environment contains ANDROID_NDK_REPOSITORY variable:

echo $ANDROID_NDK_REPOSITORY

Also, /Users/tm/Library/Android/sdk/ndk-bundle directory should contain a subdirectory android-ndk-r15 that contains NDK v15 so that, for example, source.properties has this location: /Users/tm/Library/Android/sdk/ndk-bundle/android-ndk-r15/source.properties.