Let me tell steps followed by me so that it may help in finding bug…
Downloaded cocos2d-x setup and extracted in D:
then inside cocos2dx setup, opened file create-android-batch-project.sh
~~> set Path of cygwin
~~> set Path of ndk root(D:)
~~> set path of sdk/tools
3)The run batch file, giving project Name, target….so after running it creates a project “Test1” inside cocos2dx directory
4)Then i opoened /cocos2dx/Android.mk file and changed
—> LOCAL_CFLAGS :=~~DUSE_FILE32API -DGL_GLEXT_PROTOTYPES=1
5)then i open cygwin terminal, go inside Test4/android… then ./build_native.sh…
6)I opoened eclipse—> New Android Project—> opene from existing—> gave location of Test1/android and then gave Target
7)Then when i run as Android Applications….it gives compilation error as no R.java is generated…
R.java is generated when you build the project. There may be some errors prevents the generation.
May be you should read the article [[Some cautions of Android 4.0]].