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.