I have an Android project setup in Eclipse which uses the JNI to access C code, and everything does work fine until I open one of the C files. Once that's done I get these errors:
I have tried quite a bit of things, including this:
Surprise behavior of eclipse for C files while using JNI, Why so?
My NDK path is also set like so:
Has anyone got a solution to this? Please note that closing the project and reopening makes the problem go away but once you open a C source file the problem appears again. Also note, that the project compiles, runs and makes use of the JNI wrapper and underlying C source just fine if I do not open a C file.
EDIT:
When hovering towards the explicit red bugs I get messages like Type jstring could not be resolved. I kind of understand what the problem might be, what I don't understand is that why is this a problem only when I open the source file? And why, If i don't open the file in the editor, this works perfectly?
EDIT 2:
I forgot to mention that I am doing this on a mac.