Error occurred after build_native.sh in eclipse ....

16:04:25 * Incremental Build of configuration Default for project TestPrj1*
bash “D:androidcocos2d-x-masterTestPrj1proj.android/build_native.sh” NDK_DEBUG=1 V=1 all
NDK_ROOT = D:ndk-r8d
COCOS2DX_ROOT = /d/android/cocos2d-x-master/TestPrj1/proj.android/…/…
APP_ROOT = /d/android/cocos2d-x-master/TestPrj1/proj.android/…
APP_ANDROID_ROOT = /d/android/cocos2d-x-master/TestPrj1/proj.android
cp: cannot open `/d/android/cocos2d-x-master/TestPrj1/proj.android/…/Resources/CloseNormal.png’ for reading: Permission denied
cp: cannot open `/d/android/cocos2d-x-master/TestPrj1/proj.android/…/Resources/CloseSelected.png’ for reading: Permission denied
cp: cannot open `/d/android/cocos2d-x-master/TestPrj1/proj.android/…/Resources/HelloWorld.png’ for reading: Permission denied
Using prebuilt externals
make.exe: Entering directory `/d/android/cocos2d-x-master/TestPrj1/proj.android’
rm
f ./libs/armeabi/lib**.so ./libs/armeabi-v7a/lib**.so ./libs/mips/lib**.so ./libs/x86/lib**.so
rm f ./libs/armeabi/gdbserver ./libs/armeabi-v7a/gdbserver ./libs/mips/gdbserver ./libs/x86/gdbserver
rm
f ./libs/armeabi/gdb.setup ./libs/armeabi-v7a/gdb.setup ./libs/mips/gdb.setup ./libs/x86/gdb.setup
Gdbserver : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
install ~~p /d/android/android-ndk-r8d/prebuilt/android-arm/gdbserver/gdbserver ./libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
echo “set solib-search-path ./obj/local/armeabi” > ./libs/armeabi/gdb.setup
echo “directory d:/android/android-ndk-r8d/platforms/android-14/arch-arm/usr/include d:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx d:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx/include d:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx/kazmath/include d:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx/platform/android d:/android/android-ndk-r8d/sources/cxx-stl/gnu-libstdc**/4.6/include d:/android/android-ndk-r8d/sources/cxx-stl/gnu-libstdc**/4.6/libs/armeabi/include d:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx/platform/third_party/android/prebuilt/libpng/include d:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx/platform/third_party/android/prebuilt/libjpeg/include d:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx/platform/third_party/android/prebuilt/libxml2/include d:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx/platform/third_party/android/prebuilt/libtiff/include jni/…/…/Classes” >> ./libs/armeabi/gdb.setup
Compile*+ thumb : hellocpp_shared <= main.cpp
/d/android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-g*+~~MMD MPMF ./obj/local/armeabi/objs-debug/hellocpp_shared/hellocpp/main.o.d.org fpicffunction-sections funwind-tablesfstack-protector ~~DARM_ARCH_5~~DARM_ARCH_5T ~~DARM_ARCH_5E~~DARM_ARCH_5TE no-canonical-prefixesmarch=armv5te mtune=xscalemsoft-float fno-exceptionsfno-rtti mthumbOs gDNDEBUG fomit-frame-pointerfno-strict-aliasing finline-limit=64O0 UNDEBUGmarm fno-omit-frame-pointerIjni/…/…/Classes Id:/android/android-ndk-r8d/sources/cxx-stl/gnu-libstdc++/4.6/includeId:/android/android-ndk-r8d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include Id:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dxId:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx/include Id:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx/kazmath/includeId:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx/platform/android Id:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx/platform/third_party/android/prebuilt/libpng/includeId:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx/platform/third_party/android/prebuilt/libjpeg/include Id:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx/platform/third_party/android/prebuilt/libxml2/includeId:/android/cocos2d-x-master/TestPrj1/proj.android/…/…/cocos2dx/platform/third_party/android/prebuilt/libtiff/include IjniDANDROID Wno-psabiDUSE_FILE32API Wa,—noexecstackfrtti Id:/android/android-ndk-r8d/platforms/android-14/arch-arm/usr/includec jni/hellocpp/main.cpp -o ./obj/local/armeabi/objs-debug/hellocpp_shared/hellocpp/main.o && ./obj/convert-dependencies.sh ./obj/local/armeabi/objs-debug/hellocpp_shared/hellocpp/main.o.d
jni/hellocpp/main.cpp:1:25: fatal error: jni/…/…/Classes/AppDelegate.h: Permission denied
compilation terminated.
make.exe: * [obj/local/armeabi/objs-debug/hellocpp_shared/hellocpp/main.o] Error 1
make.exe: Leaving directory `/d/android/cocos2d-x-master/TestPrj1/proj.android’

16:04:26 Build Finished (took 1s.421ms)

Is this a machine being used by multiple users? Was cygwin+ndk installed as another user?
It appears as though the user whom the build_native.sh script is running as does not have permission to read source (and asset) files required for the compilation script.

Notice in the logs:
At the time the script tries to copy resources (into proj.android/res)

cp: cannot open `/d/android/cocos2d-x-master/TestPrj1/proj.android/…/Resources/CloseNormal.png’ for reading: Permission denied
At the time it tries to compile main.cpp, which tries to #include Classes/AppDelegate.h:
Compile++ thumb : hellocpp_shared <= main.cpp

jni/hellocpp/main.cpp:1:25: fatal error: jni/…/…/Classes/AppDelegate.h: Permission denied

You may want to allow the read permission on all files in your project directory to the user you’re (eclipse is) running build_native.sh. Note that this (cygwin user) may be separate from your Windows user. You’ll have to issue the permission granting command under cygwin. You’d do this on the lines of the steps mentioned below (you may have to run cygwin as the Windows user that installed it on the computer). Also note that right-clicking and adding permissions to files using Windows Explorer may not necessarily apply under cygwin (I’ve noticed this on machines using domain accounts, though it may be related to incorrect configuration/installation).

Launch the cygwin terminal (as the installing user). This may be in C:\cygwin\bin\mintty.exe etc. You might also have “Cygwin Terminal” shortcut installed on your desktop or program menu.
Switch to your TestPrj1 (Project’s) directory
cd /d/android/cocos2d-x-master/TestPrj1/
Allow permissions to the group or just all users for files in this directory:
sudo chmod -R g+w *
sudo chmod -R a+w *
Then try and run build_native.sh either from Eclipse (or from the Cygwin Terminal as); You may be able to use your own user now)
cd proj.android
./build_native.sh

Further reading:
Understanding unix permissions - the type of permissions that apply to your files in cygwin/ndk