Unresolved injection sion in the java header in JNI, javassionjni

Source: Internet
Author: User

Unresolved injection sion in the java header in JNI, javassionjni
 

After the eclipse ndk development environment is created, open the hello-jni project in samples of jni. Adding native and running are fine, but opening the hello-jni.c shows a red dot:

<BuildCommand> <name> org. eclipse. cdt. managedbuilder. core. genmakebuilder </name> <triggers> clean, full, incremental, </triggers> <arguments> </buildCommand>

 

        <buildCommand>            <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>            <triggers>full,incremental,</triggers>            <arguments>            </arguments>        </buildCommand>

 

        <nature>org.eclipse.cdt.core.cnature</nature>        <nature>org.eclipse.cdt.core.ccnature</nature>        <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>        <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>

3. Save

4. Delete the. cproject file in the same folder

5. re-open eclipse

6. Right-click the project --> Android Tools --> Add Native Support... and click finish.

If the problem persists,

Method 2: add the path of the c and c ++ Libraries

Right-click the project --> Properties --> C/C ++ General --> Path and Symbols --> des, and click Add... the button adds the include path to the ndk path. my options are:

D: \ xunleidownloaded \ android-ndk-r10e \ platforms \ android-16 \ arch-arm \ usr \ include

Refresh project, problem solving:

 

For NewStringUTF's Unresoved problem, find it, the imperfect solution is to remove the Method cannot be resolved check item in Window --> Preferences --> C/C ++ --> Code Analysis.

 

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.