Android NDK: Assertion failure: TARGET_PLATFORM is not defined

匿名 (未验证) 提交于 2019-12-03 03:10:03

问题:

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?

回答1:

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.)



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!