Cocos2d-x with Genymotion?

Cocos2d-x with Genymotion?
0.0 0


If i try to run my application thru Genymotion emulator (super fast android emulator), the application stops working and i get these errors

Is there any way to run it?

cocos2dx 3.0 rc0 on Genmotion
Best way to test your project when you're developing it for Android?

Hi Tomáš

I was trying as well to run Genymotion emulator to avoid that annoying slowness of the official emulator and I was given the same errors you have but at the end I think I have solved it with two changes:

  1. You need to be able to generate for different architecture, In my case I was generating only the armabi, and you need armabi-v7a and x86,Though I am not sure of the need of the v7a architecture, I think Genymotion is emulating android running a linux virtual machine with x86 architecture. For generating this new architectures you need to change this is the change done to that file:
    APP_STL := gnustl_static
    +APP_ABI := armeabi armeabi-v7a x86
    with that change you should generate three different versions of the .so library
  2. Once you have that libraries changes you will notice that even the emulator is unable to run your game as and it will complain about OpenGL configurations, thats because that run is not flagged as to run in a emulator and the game configures OpenGL differently. For getting that run flagged as emulator run you need to introduce a little change on /cocos2dx/platform/android/java/src/org/cocos2dx/lib/
    You need to change the function isAndroidEmulator to include this check product.contains("vbox") that vbox is a substring presented on the Genymotion emulator product name. In a nutshell, replace:
    isEmulator = product.equals(“sdk”) || product.contains(“_sdk”) || product.contains(“sdk_”);@
    isEmulator = product.equals(“sdk”) || product.contains(“_sdk”) || product.contains(“sdk_”) || product.contains(“vbox”);@

I think with that two changes you will be ready to run cocos2dx applications on Genymotion


Cocos2d-x and genymotion

Borja Outerelo Gamarra, Thank you very much


@Borja Outerelo Gamarra: Thank you so much !