java - Eclipse shows error, while ndk_build is sucessful -


this question has answer here:

i doing java native development android. , use android ndk , eclipse ide. write c/c++ code in jni , eclipse shows errors such as:

could not resolved:

  1. jniexport
  2. jnicall
  3. jnienv
  4. jobject
  5. jint

but on other hand ndk-build builds .so file sucessfully without error or warnings. how fix in eclipse?

if need here code compile:

#include <jni.h> #include <unistd.h>  int multiply(int i, int j) {          int x = * j;          return x; }  extern "c" {          jniexport jint jnicall java_cookbook_chapter3_hellondkgdbactivity_multiply(jnienv* env, jobject o, jint pi, jint pj){            int = 1, j = 0;            while (i) {              j=(++j)/100;            }            return multiply(pi, pj);         } } 

try refresh project tree. eclipse shows error, why when click on project , press f5 (refresh), errors gone. don't please try approach below:

turn off checks in project properties -> c/c++ general -> code analysis

see actual answer here: syntax error notification in native code in eclipse using newest ndk r8d


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -