ISSUE: Coordinates are upside down

ISSUE: Coordinates are upside down
0.0 0



I decided to create a hybrid Win32 and Android project. Here are the steps. However my Android project runs upside down, they appear to be rotated by 90º ClockWise . I have posted all images and settings used. Please advice on proper course of action.

Win32 Project

  1. Created my Win32 “winand” Project using the Wizard on Visual Studio 2010. Sound and Box2D (default settings).

  2. Changed one string “Hello World” to “Hello World WinANDROID” and size to 32.

  3. Build my Win32 project

  4. Test by Run project. Works perfect.

Android Project

  1. Rename Win32 Folder to “winand_TEMP”
  2. Use script: create-android-project.bat to create a folder with the previous name
  • package name: org.cocos2d.winand
  • project name: winand
  1. copy android folder into winand_TEMP
  2. remove winand
  3. rename winand_TEMP to winand
  4. open Cygwin batch shell and navigate to …/winand/android folder
  5. build project using ./


Compile thumb  : stlport_static <= c_locale.c
Compile thumb  : stlport_static <= cxa.c
StaticLibrary  : libstdc++.a
make: Circular /cygdrive/c/Users/dan/Downloads/cocos2d-1.0.1-x-0.9.2/cocos2d-1.0
.1-x-0.9.2/winand/android/obj/local/armeabi/libstlport_static.a <- /cygdrive/c/U
j/local/armeabi/libstlport_static.a dependency dropped.
StaticLibrary  : libstlport_static.a
SharedLibrary  :
Install        : => libs/armeabi/
Compile++ thumb  : cocosdenshion <= SimpleAudioEngine.cpp
Compile++ thumb  : cocosdenshion <= SimpleAudioEngineJni.cpp
SharedLibrary  :
Install        : => libs/armeabi/
Compile++ thumb  : game <= main.cpp
Compile++ thumb  : game <= AppDelegate.cpp
In file included from C:/Users/dan/Downloads/cocos2d-1.0.1-x-0.9.2/cocos2d-1.0.1
d/jni/helloworld/../../../Classes/HelloWorldScene.h:6:25: error: Box2D/Box2D.h:
No such file or directory
make: *** [/cygdrive/c/Users/dan/Downloads/cocos2d-1.0.1-x-0.9.2/cocos2d-1.0.1-x
gate.o] Error 1
make: Leaving directory `/cygdrive/c/Users/dan/Downloads/cocos2d-1.0.1-x-0.9.2/c

It appears that Box2D can’t be found. OK looking at the error code it wants Box2D inside the …/winand/Classes. OK let’s do that!
8) Copy Box2D folder from root cocos2d-x into …/winand/Classes.
9) Start Eclipse, create New Android Project, create project from existing source, point it to …/winand/android and select the SDK API level.
10) Build the package
11) Connect USB Device.
12) Run as Android Application.

Application starts but there are some issues, the application runs upside down.

Image Capture from Samsung Galaxy S i9000

This is the manifest file


I think I find the mistake, AppDelegate.cpp generated by msvc template is wrong.
It uses old version.
So you should copy android folder and Classes folder into winand_TEMP.


Yep that is it. Thanks! I fixed my AppDelegate.cpp to use

//Android does not need setup. It uses XML
// sets landscape mode
#endif // CC_PLATFORM_WIN32

perhaps it would be worth patching the …2d-1.0.1-x-0.10.0\template\msvc\CCAppWiz.win32\Templates\1033\Classes\AppDelegate.cpp Template so that there isn’t an issue any more. Also it may be worth merging all changes on the generated AppDelegates so that 0.11.0 we can build hybrid projects with ease.


#915 is created for it.
Thank you.



In lieu to the setup of Cocos2d-x wiht Visual Studio. is there a way where in I will be creating cocos2d-x android project using vs-android directly?