[Android] A Roundup of Common NDK Compilation Issues
1. Error: Are you sure your NDK_MODULE_PATH variable is properly defined ?
If you encounter the following error when building an NDK project:
Android NDK: jni/clapack/SRC/Android.mk: Cannot find module with tag 'mymodule' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
jni/Android.mk:56: *** Android NDK: Aborting. . Stop.
One way to fix this is to right-click your project in Eclipse, select Properties, and set the following environment variable to point to your module directory:

Another option is to add the module directory to PATH in Android.mk:
Find:
$(call import-module, your module)
Add your module path between these lines. In this example, I use the current project’s path:
$(call import-add-path,my_relative_path)
2. Error: Cannot find module with tag ‘cpufeatures’ in import path
If you encounter the following error when building an NDK project:
Cannot find module with tag 'cpufeatures' in import path
Your Android.mk may not be importing the module correctly, possibly because of API differences between older and newer versions of the NDK. Find:
$(call import-module,cpufeatures)
Replace it with:
$(call import-module,android/cpufeatures)
3. Error: Symbol ‘vector’ could not be resolved
If you encounter the following error when building an NDK project:
Symbol 'vector' could not be resolved
To fix this, change the following settings:
1) Right-click the project directory and select Properties -> C/C++ General -> Code Analysis.
Select Use project settings.
Then uncheck Syntax and semantic errors, as shown below:

2) Select Paths and Symbols. On the Includes tab, click Add and enter $ndk_root\platforms\android-*\arch-arm\usr\include. Adjust the path and version to match your NDK installation. Also check Add to all languages, as shown below:

Save your settings.