Buck: build failure on win: BUILD FAILED: No native platforms detected. Probably Android NDK is not configured properly.

Created on 18 Jul 2017  路  5Comments  路  Source: facebook/buck

windows10 cmd build
my env config:
ANDROID_HOME: D:dev_programsandroid-sdk
ANDROID_SDK: D:dev_programsandroid-sdk
ANDROID_NDK_REPOSITORY: D:dev_programsandroid-ndk-r13b

in D:dev_programsandroid-ndk-r13b
--- build
--- platforms
--- prebuild
--- ndk-build.cmd
--- ndk-depends.cmd
--- etc...

in D:dev_programsandroid-sdk
--- add-ons
--- build-tools
--- docs
--- AVD Manager.exe
--- etc...

so, I just build the demo app, and I got a problem
BUILD FAILED: No native platforms detected. Probably Android NDK is not configured properly.

Most helpful comment

ANDROID_NDK_REPOSITORY should point to a folder that contains specific versions of NDK. In your case it's D:\dev_programs

All 5 comments

ANDROID_NDK_REPOSITORY should point to a folder that contains specific versions of NDK. In your case it's D:\dev_programs

BTW android rules that uses the NDK doesn't currently work properly on windows, so @ilya-klyuchnikov tells me.

both env and project config may be
but this case env was set, so the problem should be at project config.
see https://buckbuild.com/concept/buckconfig.html#android.build_tools_version

modifiy .buckconfig in project should be ok
f.e.
[ndk]
ndk_version = 15.1.4119039

@krossford
Add

ANDROID_HOME=/Users/xxx/Library/Android/sdk
ANDROID_NDK=/Users/xxx/Library/Android/sdk/ndk-bundle

to your .buckconfig file.

This wasn't working for me too.After hit and trial, following got this working...
I uninstalled android ndk then installed and added following lines in bash and buckconfig file respectively.

bash file
export ANDROID_SDK="/Users/username/Library/Android/sdk/"
export ANDROID_HOME="/Users/username/Library/Android/sdk/"
export ANDROID_NDK="/Users/username/Library/Android/sdk/ndk-bundle"
export NDK_HOME="/Users/username/Library/Android/sdk/ndk-bundle"

buckconfig file
ndk_path = /Users/username/Library/Android/sdk/ndk-bundle
ndk_version = 17.1.4828580[note the version while it is installing]

And it worked

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zayhero picture zayhero  路  10Comments

kageiit picture kageiit  路  9Comments

shybovycha picture shybovycha  路  6Comments

nikhedonia picture nikhedonia  路  16Comments

brettwooldridge picture brettwooldridge  路  7Comments