Attached 1:android.mk to the JNI directory:
In a directory, such as/src/modules1/under ANDROID.MK and application.mk, call Ndk-build attempt to compile, you will encounter the following error:
Android ndk:could not find application project directory!
Android ndk:please define the Ndk_project_path variable to the it.
/opt/android-ndk-r9d/build/core/build-local.mk:148: * * * Android ndk:aborting. Stop.
This is because the current android.mk is not placed within the JNI directory. So Ndk-build can't find android.mk. (Ndk-build will find the JNI directory up from this directory and android.mk from the JNI directory) and ndk_project_ PATH, App_build_script, NDK_APPLICATION_MK is an empty value.
How to solve this problem. First of all, of course, create the JNI directory and add android.mk and application.mk to it.
But on the other hand, it is also possible to explicitly indicate these three values:
The directory structure is as follows:
/src/modules1/android.mk
Under this directory:
/opt/android-ndk-r9d/ndk-build-b v=1 ndk_project_path=. App_build_script=./android.mk ndk_application_mk=./application.mk
can also be compiled normally.
Note: The NDK version here is NDK r7c. (Different NDK versions, the makefile generated by Ndk-build are not identical)
ANDROID.MK relationship to the JNI directory