This applies to version 2.1.1. Tested and working.
If you already use Mingw32, installing Cygwin is an innecesary step (and probably, headache).
This takes a few minutes.
Modify the following line (to use Mingw32 instead of cygwin):
Replace C:with your Mingw installation path.
Modify the following three lines:
Replace /d/dev/cocos2d-2.1beta3-x-2.1.1/ with your current cocos2d-x path.
for /f "delims=" %%A in ('%_CYGBIN%\cygpath.exe "%~dpn0.sh"') do set _CYGSCRIPT=%%Awith
for /f "delims=" %%A in ('%_CYGBIN%\cygpath.exe "%cd%"') do set _CURRENTDIR=%%Awith
for /f "delims=" %%A in ('%_CYGBIN%\cygpath.exe "%_NDKROOT%"') do set _NDKROOT=%%Awith
Replace /d/dev/android-ndk-r8d with you current NDK path.
Just run the bat file and you’re done!
Using Mingw with new Android projects (v2.1.2) is even easier than using Cygwin.
You can also use this for latest version 2.1.2, even though we have a new project-creator python script (which I recommend using).
Mingw32 also work with the new Android projects as described here:
Just append the Mingw msys bin directory to path, instead of cygwin’s
C:.0\bin (or whatever path you installed it too).
And skip Cygwin installation and all related steps (no need to modify Cygwin\etc\fstab, neither adding CYGWIN and SHELLOPTS variables to eclipse’s enviroment variables)