2013-10-13 60 views
1

所以,我正確安裝eclipse,android sdk,ndk,coocs2d-x 2.1.4的問題。我可以構建cocos2d-x android項目,將它導入到eclipse等等。一切似乎都很好,但不是真的。問題是我無法啓動我的虛擬機來模擬操作系統。我創建了avd,它可以很好地處理簡單的android項目,但是當我使用它作爲android應用程序運行cocos2d-x項目時,它什麼都不做。根本沒有輸出。我找到了this guide並跟着它。但我遇到了一個問題。所有的第一,當我按照此步驟:Eclipse Android SDK錯誤:未知的虛擬設備名稱

Now start the Android for x86 Intel Emulator using the following command:

$ <SDK directory>/tools/emulator-x86 -avd Your_AVD_Name -qemu -m 2047 -enable-kvm 

我有一個錯誤消息:

gloomist-CN tools # ./emulator-x86 @myavd -qemu -m 2047 -enable-kvm
emulator: ERROR: unknown virtual device name: 'myavd'
emulator: could not find virtual device named 'myavd'

但它是在SDK爲有效的機器人虛擬設備。而下一個。在該教程中,我粘貼的鏈接上面,最後一步是:

 
Run the emulator with the correct library path and options 

Make sure to 

    Set the library path to the directory containing the Open GL library for the emulator (LD_LIBRARY_PATH=...) 
    Run the x86 version of the emulator (run /tools/emulator-x86) 
    Enable GPU use (Use the option "-gpu on") 
    Also, you need to specify the name of the Android Virtual Device to use (Use the option "-avd ") 

On OS X the command line looks like this 

    LD_LIBRARY_PATH=~/bin/android-sdk/tools/lib ~/bin/android-sdk/tools/emulator-x86 -verbose -avd android17x86 -gpu on 

我真的不知道通過這一切意味着什麼作家。任何人都可以解釋我的方式來做到這一點在Linux?

所以基本上,主要問題是:如何在lixnux上的eclipse中的AVD上運行cocos2d-x項目?而已。我使用Linux版本3.2.0-23-generic(buildd @ palmer)(gcc版本4.6.3(Ubuntu/Linaro 4.6.3-1ubuntu4))#36-Ubuntu SMP Tue Apr 10 20:41:14 UTC 2012(Ubuntu 3.2.0-23.36-generic 3.2.14)。

任何人都可以幫助我弄清楚如何在AVD上使用eclipse準確啓動我的cocos2d-x項目?

回答

2

你確定'myavd'是一個有效的avd嗎?

嘗試運行此命令來獲取您已在系統中創建AVD的列表:

# <SDK directory>/tools/android list avd 

並重新運行模擬器86通過一個有效的AVD。

我也建議你按照一步一步的指導如何配置你的android環境隨cocos2d-x dist。你可以找到它:/samples/Cpp/TestCpp/proj.android/README.md

希望這有助於