I have experience with cocos2d+iphone and I now want to get some experience with the cocos2d+android. So, I'm following this good tutorial found here http://dan.clarke.name/2011/04/how-to-make-a-simple-android-game-with-cocos2d/ for some reason, I always get a black screen. I guess this is the name of the activity. I'm fairly new with android OS so I'm barely understanding how this works. Anyways, has anyone with experience using cocos2d with android ever seen something like that? Is there something that I'm missing in my eclipse configuration?
-
1Could you post your code so far? – ravuya Mar 27 '12 at 02:03
-
Did you ever fix this? I have the same issue. – Mr Pablo Jun 03 '15 at 12:45
3 Answers
The best way to programming in cocos2d is using a real device, the emulator is too slow (<10fps)
By the way:
1º First of all, start the Android emulator. Target: The same as the project, if is a different target, could not work (could stay black, only happen sometimes) 2º Go to Run configuration, and select the same target that the project and the emulator. 3º Launch the project (if emulator is completely loaded), and wait. 4º Voilá.

- 11,831
- 13
- 78
- 130
Yes harold, i have faced this problem. Do one this make new avd with android 4.0 and try to run on this emulator. hope it works.

- 1,863
- 1
- 23
- 38
Go to org.cocos2d.nodes package and there in the class CCDirector.java find the method SetProjection and also find this state GLU.gluPerspective(gl, 60, size.width/size.height, 0.5f, 1500.0f); and after you finded this , your topic is to replace with this >=== GLU.gluPerspective(gl, 60, size.width/size.height, 0.5f, 2000.0f);
And it will work perfectlly

- 11
- 1