Build android shared lib using ndk-build without have jni folder

好久不见. 提交于 2019-12-03 20:18:01

worked as follows:

ndk-build APP_BUILD_SCRIPT=path/to/path/to/project/Android.mk NDK_PROJECT_PATH=path/to/path/to/project

I would still recommend using a subdirectory like jni for storing the source, to keep the build products in subdirectories such as obj, libs and bin more clearly separated.

But if you have your Android.mk elsewhere, you should be able to do ndk-build APP_BUILD_SCRIPT=path/to/Android.mk. If you don't want to type this every time, you can add a file named jni/Application.mk where you type APP_BUILD_SCRIPT=path/to/Android.mk. Alternatively you have a file named jni/Android.mk which then includes the real Android.mk from where you store it.

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