Android NDK Development compiled C + + file appears type ' Jint ' could not being resolved and unresolved inclusion: <jni.h> Solutions

Source: Internet
Author: User

Today, when compiling the Android NDK project, a lot of errors were reported in the CPP file under the Jni folder, such as: unresolved inclusion: <jni.h>, Type ' jint ' could not being resolved, Type ' Jintarray ' could not being resolved, according to experience, such errors are certainly not caused by the corresponding header files.

Solution:

Select the project, right-->properties, click c/C + + general expansion, click Path and Symbols, on the right includes, click Add, the Ndk folder under the JNI header file and the corresponding C + + header file to add in. Be sure to fill in the complete path, such as the two paths I added are:

E:\AndroidNDK\android-ndk-r10c\toolchains\mipsel-linux-android-4.8\prebuilt\windows-x86_64\lib\gcc\ Mipsel-linux-android\4.8\include

E:\AndroidNDK\android-ndk-r10c\platforms\android-19\arch-arm\usr\include

As shown in the following:

Everyone in their NDK file installation directory under the reference to my path to find the appropriate include folder, add the inclusion path, and then recompile, will not error.

Android NDK Development compiled C + + file appears type ' Jint ' could not being resolved and unresolved inclusion: <jni.h> Solutions

Related Article

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.