Error: Flag '-l' is not valid for 'update project'

version: cocos2d-x-2.1.5
create-android-project.bat indicates an error of:
Error: Flag ‘-l’ is not valid for ‘update project’

Not sure if the above is critical but if it is invalid, why is the flag in the script?

The resulting build_native.sh does execute correctly either under cygwin. That generates the following error:

$ ./build_native.sh
NDK_ROOT = /cygdrive/d/ANDROID/android-ndk-r8d
COCOS2DX_ROOT = /cygdrive/d/ANDROID/COCOS2D-X/cocos2d-x-2.1.5/spaceportfe/proj.android/…/…
APP_ROOT = /cygdrive/d/ANDROID/COCOS2D-X/cocos2d-x-2.1.5/spaceportfe/proj.android/…
APP_ANDROID_ROOT = /cygdrive/d/ANDROID/COCOS2D-X/cocos2d-x-2.1.5/spaceportfe/proj.android
Using prebuilt externals
make: Entering directory `/cygdrive/d/ANDROID/COCOS2D-X/cocos2d-x-2.1.5/spaceportfe/proj.android’
Cygwin : Generating dependency file converter script
Compile++ thumb : game_shared <= main.cpp
In file included from D:/ANDROID/COCOS2D-X/cocos2d-x-2.1.5/spaceportfe/proj.android/…/…/cocos2dx/base_nodes/CCNode.h:34:0,
from D:/ANDROID/COCOS2D-X/cocos2d-x-2.1.5/spaceportfe/proj.android/…/…/cocos2dx/actions/CCActionInterval.h:30,
from D:/ANDROID/COCOS2D-X/cocos2d-x-2.1.5/spaceportfe/proj.android/…/…/cocos2dx/include/cocos2d.h:41,
from jni/hellocpp/main.cpp:6:
D:/ANDROID/COCOS2D-X/cocos2d-x-2.1.5/spaceportfe/proj.android/…/…/cocos2dx/platform/android/CCGL.h:40:31: fatal error: GLES2/gl2platform.h: No such file or directory
compilation terminated.
/cygdrive/d/ANDROID/android-ndk-r8d/build/core/build-binary.mk:269: recipe for target `obj/local/armeabi/objs/game_shared/hellocpp/ main.o’ failed
make: * [obj/local/armeabi/objs/game_shared/hellocpp/main.o] Error 1
make: Leaving directory `/cygdrive/d/ANDROID/COCOS2D-X/cocos2d-x-2.1.5/spaceportfe/proj.android’

I’m not expert with these scripts, but it appears that GLES2 is not defined. I am also using NDK R8. I had no problems with cocos 1.0.1.

Any help would be appreciated.

here , same problem here . You just need to create new cocos2d-x project , then copy all the code and res to that . SOLVED . I think the problems is not by us or Cocos team , just some things go wrong when we delete somethings in project director .