Unfortunately ... has stopped - RESOLVED

Hello, I am new to Cocos2d-x, after trying for few days, common issues “Unfortunately … has stopped” can be resolved. Reading from online documents, it was a bit fragmented, at certain point, I have to trial and error of it, may be due to software platform and version changes.

Below were certain important points documented, running under 64bit Windows 8.1 Pro, 16GB RAM. Hopes it works for you.

How to compile Cocos2d-x TestCpp for Android via Windows Eclipse.

  1. SOFTWARE REQUIREMENTS:

    • Install 32bit jdk-7u51-windows-i586.exe as C:\Java
    • Install 64bit cygwin-setup-x86_64.exe as C:\Cygwin64
    • Install mingw-get-setup.exe as C:\MinGW
    • Unzip 32bit eclipse-standard-kepler-SR1-win32.zip as C:\eclipse
    • Unzip 32bit android-ndk-r9c-windows-x86.zip as C:\android-ndk-r9c
    • Unzip cocos2d-x-2.2.2.zip as C:\cocos2d-x
  2. ENVIRONMENT VARIABLES:

    • JAVA_HOME=C:\Java\jdk1.7.0_51
    • NDK_ROOT_LOCAL=c:\android-ndk-r9c
    • ANDROID_SDK_ROOT_LOCAL=C:\Program Files (x86)\Android\android-sdk
    • COCOS2DX_ROOT=c:\cocos2d-x\cocos2d-x-2.2.2
    • Append to “Path” with C:\Java\jre7\bin;c:\cygwin64\bin
  3. MUST READ C:\cocos2d-x\cocos2d-x-2.2.2\samples\Cpp\TestCpp\proj.android\README.MD

  4. To install ADT and CDT plugin into Eclipse:

  5. ANDROID VIRTUAL DEVICE (AVD)

    • Make sure you select the “Use Host GPU” option from AVD dialog as
      shown as the attached AVD.JPG before Run and Debug.
  6. DONE.


AVD.jpg (114.9 KB)

This is awesome, thanks for posting this :slight_smile:

Thanks, I have removed the ADT zipped version as it is handy to install via SDK Manager,
which ADT is installed into C:\Program Files (x86)\Android\android-sdk.

Therefore, the new environment is:

 ANDROID_SDK_ROOT_LOCAL=C:\Program Files (x86)\Android\android-sdk