I have an Android NDK project whose NDK part compiles ok from command line; I used to have no problems with running the compiled stuff from under Eclipse as a pure Java project.
The configuration of CDT indexer needs to enable "Index unused headers ..."
How to get there: Project->Properties->C/C++ General->Indexer.
Gets rid of the error for me.