简体   繁体   中英

Porting Xcode(iOS) code to eclipse(android) in cocos2d-x

I implemented my game in xcode using cocos2d-x templates. It works absolutely fine. Then i tried to port the same code to eclipse. I created a new project using the shell command of cocos2d-x and built the project. Then i converted the created project to run as C/C++ code as i would normally do for cocos2d-x. Then i copied all the code files/resources from my xcode project to eclipse project. I updated my Android.mk file according(added the new src files). It compiled correctly, installed the emulator successfully but then it crashes showing this error message in log:

07-11 10:29:38.846: D/libEGL(534): loaded /system/lib/egl/libGLESv1_CM_emulation.so
07-11 10:29:38.856: D/libEGL(534): loaded /system/lib/egl/libGLESv2_emulation.so
07-11 10:29:39.166: A/libc(534): @@@ ABORTING: INVALID HEAP ADDRESS IN dlfree
07-11 10:29:39.166: A/libc(534): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)

Any help would be appreciated.

There are some extra steps involved with getting cocos2d-x running in the emulator. Have you followed those steps? (I can't remember off the top, but I think you have to make sure the OpenGL hardware acceleration feature is enabled on your virtual device, and there might also be some code you need to patch into your project.)

I tried performing those steps, but never got it to run and wasn't persistent enough to stick with it since I happen to have an Android phone anyway.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM