Android NDK: assertion failure: TARGET_PLATFORM not defined

When using NDK r5b, when I do the assembly in my jni directory using

$NDK_DIR/ndk-build 

It works great. But when I switch to r6b (just setting $ NDK_DIR differently) and run the same command, I get

/usr/local/android-ndk-r6b/build/core/setup-toolchain.mk:20: *** Android NDK:  Assertion failure: TARGET_PLATFORM is not defined    .  Stop.

What do I need to do differently in r6b, what do I not need to do in r5b?

+5
source share
1 answer

The solution is to add this line to jni / Application.mk:

APP_PLATFORM: = android-8

This is new for r6b. (Not required in r5b or r6, just r6b.)

+6
source

All Articles