2012-07-13 94 views
3

我一直在试图使用的Cocos2D-X上手,因为我想玩弄制作一个应用程序,与Android和iOS兼容的想法。我一直在经历一个教程(http://www.raywenderlich.com/11283/cocos2d-x-for-ios-and-android-getting-started),它解释了如何使用eclipse运行程序,但是我遵循了它的详细步骤,但没有得到相同的结果。Android上的Cocos2D-X没有运行

当我在Eclipse中运行的程序,它会启动一个AVD,这将去滑动解锁屏幕。当我解锁时,我会看到一个黑屏。

我将包括控制台日志Eclipse已经产生了底部,因为它可能说过这可能会涉及,为什么我不能得到这个程序协同工作。

最后,我只是说,我没有改变Android项目中的任何代码,它与创建它的Cocos2D-X脚本完全一样,这就是为什么我不明白为什么它不起作用。

谢谢您的阅读,我希望你能帮助我。

控制台登录:

[2012-07-13 09:59:11 - com.test.samplecocos2dxandroid.samplecocos2dxandroid] ------------------------------ 
[2012-07-13 09:59:11 - com.test.samplecocos2dxandroid.samplecocos2dxandroid] Android Launch! 
[2012-07-13 09:59:11 - com.test.samplecocos2dxandroid.samplecocos2dxandroid] adb is running normally. 
[2012-07-13 09:59:11 - com.test.samplecocos2dxandroid.samplecocos2dxandroid] Performing com.test.samplecocos2dxandroid.samplecocos2dxandroid activity launch 
[2012-07-13 09:59:11 - com.test.samplecocos2dxandroid.samplecocos2dxandroid] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'Android2.2' 
[2012-07-13 09:59:11 - com.test.samplecocos2dxandroid.samplecocos2dxandroid] Uploading com.test.samplecocos2dxandroid.samplecocos2dxandroid.apk onto device 'emulator-5554' 
[2012-07-13 09:59:12 - com.test.samplecocos2dxandroid.samplecocos2dxandroid] Installing com.test.samplecocos2dxandroid.samplecocos2dxandroid.apk... 
[2012-07-13 09:59:19 - com.test.samplecocos2dxandroid.samplecocos2dxandroid] Success! 
[2012-07-13 09:59:19 - com.test.samplecocos2dxandroid.samplecocos2dxandroid] Starting activity com.test.samplecocos2dxandroid.samplecocos2dxandroid on device emulator-5554 
[2012-07-13 09:59:21 - com.test.samplecocos2dxandroid.samplecocos2dxandroid] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.test.samplecocos2dxandroid/.samplecocos2dxandroid } 
+0

你有什么cocos2d-x版本?模拟器有时会给android模拟器带来问题。你可以尝试使用真实的设备。使用cocos2d-x开发游戏的模拟器速度太慢。 – vgonisanz 2012-07-13 09:31:37

+0

我正在使用最新版本的Cocos2D-x,cocos2d-2.0-rc2-x-2.0.1。这会造成问题吗? – Jon 2012-07-13 10:10:16

+0

是的,只是有人回答同样的问题^^,那就是原因,有效答案。 – vgonisanz 2012-07-13 10:37:54

回答

2

如果您使用的是最新版本的cocos2d-x的,它利用OpenGL ES 2.0的它不会在模拟器下工作。该模拟器不支持OpenGL ES 2.0。此外,使用模拟器在开发游戏时并不是很有用,因为性能会很糟糕。

+0

啊,我明白了。所以如果我要在Android设备上运行而不是模拟器,这很可能会起作用。我没有想过在设备上测试它。非常感谢:-) – Jon 2012-07-13 09:53:04

+0

'模拟器不支持OpenGL ES 2.0'我不确定Genymotion的模拟器是否属实。 – CAMOBAP 2014-02-08 21:24:52

0

您可以尝试“GPU仿真”添加到虚拟Android设备

0

可以使用genymotion仿真器的硬件性能,它支持OpenGL ES 2.0,也它就像一个天然的设备。