Question: I have been working with Android SDK for a while & just came across an requirement to use the NDK

So, I downloaded the Android NDK for Windows. Jumping on the first example, when I am trying to build the library using the process defined in the NDK example

<http://developer.android.com/sdk/ndk/overview.html>

Specifically the command /ndk-build from the command line

I am getting the error 

ndk-build is not recognized as an internal or external command, operable program or batch file

I have added the path for ndk-build in the PATH variable and even tried calling the command going to the folder, still the same error

Does anybody have a clue?

Answer: 
Once you have Cygwin installed you can have Eclipse automatically build your project for you by:

1. Right click on your project, pick properties.
2. Select "builders" from the left-hand list.
3. Click "New..." on the right side.
4. Select "Program" as the configuration type. I name mine "Native Builder"

Location - c:\cygwin\bin\bash.exe

Working Directory - c:\cygwin\bin

Arguments -

(for NDK r3):
--login -c "cd /cygdrive/c/Android\_NDK && make APP=myapp"

(for NDK r4):
--login -c "cd /cygdrive/c/ && /cygdrive/c/Android\_NDK/ndk-build"

Make sure you have the two hyphens before login and the quotes after the hyphen-c

5. Now go to the refresh tab
6. Check "Refresh resources upon completion"
7. Select "Specific resources"
8. Click on the "Specify resources" button and select your project's
lib directory.
9. Check "Recursively include sub-folders"
10. Now go to the build options tab
11. Check "Allocate Console"
12. Check "Launch in background"
13. Check "Run the builder After a Clean"
14. Check "Run the builder During manual builds"
15. Check "Run the builder During auto builds"
16. Check "Specify working set of relevant resources"
17. Click on "Specify Resources"
18. Select your project's JNI directory and all files within.
19. Now click OK on the bottom.

Now you can edit and save in your c files and it will compile and create the .so file on the fly.
Maybe, your development IDE hides system PATH and uses it's own PATH. I had same problem with MOTODEV Eclipse for Android 3.1. Detailed solution is here: [How to solve problem with Motodev Eclipse for Android 3.1: wrong PATH](http://serpents-iz.blogspot.com/2012/02/how-to-solve-problem-with-motodev.html)  It is for MOTODEV IDE, but Eclipse may have same thing.