ANDROID.MK relationship to the JNI directory

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.