android - Eclipse Android SDK 错误 : unknown virtual device name

标签 android linux eclipse android-emulator cocos2d-iphone

所以,这个问题我正确安装了eclipse,android sdk,ndk,coocs2d-x 2.1.4。我可以构建cocos2d-x android项目,将其导入到eclipse等。一切看起来都很好,但事实并非如此。问题是我无法启动虚拟机来模拟 android 操作系统。我创建了 avd,它可以很好地处理简单的 android 项目,但是当我使用它作为 android 应用程序运行 cocos2d-x 项目时,它什么也不做。根本没有输出。我发现this guide并跟随它。但我遇到了一个问题。首先,当我按照此步骤操作时:

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 中作为有效的 android 虚拟设备。还有下一张。在我将链接粘贴到上面的教程中,最后一步是:

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 4 月 10 日星期二 20:41:14 UTC 2012(Ubuntu 3.2.0-23.36-通用 3.2.14)。

谁能帮我弄清楚如何使用 eclipse 在 AVD 上准确启动我的 cocos2d-x 项目?

最佳答案

您确定“myavd”是有效的 avd 吗?

尝试运行此命令来获取您在系统中创建的 AVD 列表:

# <SDK directory>/tools/android list avd

并重新运行emulator-x86并传递有效的avd。

我还建议您按照有关如何配置 cocos2d-x dist 附带的 Android 环境的分步指南进行操作。您可以在以下位置找到它:/samples/Cpp/TestCpp/proj.android/README.md

希望这有帮助

关于android - Eclipse Android SDK 错误 : unknown virtual device name,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19351594/

相关文章:

android - ScrollView 中的 Recyclerview - 如何滚动整个内容?

linux - 百胜通过其他服务器安装

wpf - SWT 到 WPF 端口的状态是什么?

java - 在我的类(class)中找不到 ( ) 的 setter /字段

android - android.app.Fragment 和 android.support.v4.app.Fragment 用法的区别

linux - 从路径的子目录读取文件并将它们附加到一个文件

linux - 为什么链接器修改了--defsym "absolute address"

eclipse - 如何修复 "Compilation unit name must end with .java, or one of the registered Java-like extensions"?

javascript - Eclipse 的 JSDT 发生了什么?

android - OnLongClickListener 没有为 ListView 触发