Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android NDK: Assertion failure: TARGET_PLATFORM is not defined

When using NDK r5b, when I do a build in my jni directory using

$NDK_DIR/ndk-build 

it works fine. But When I switch to r6b (just by setting $NDK_DIR differently) and run that 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 that I didn't need to do in r5b?

like image 232
Scott C Wilson Avatar asked Sep 03 '11 01:09

Scott C Wilson


1 Answers

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

APP_PLATFORM := android-8

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

like image 107
Scott C Wilson Avatar answered Nov 11 '22 00:11

Scott C Wilson