首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装SDK后如何配置Android模拟器

安装SDK后如何配置Android模拟器
EN

Stack Overflow用户
提问于 2013-04-13 20:35:22
回答 1查看 4.2K关注 0票数 3

我正在尝试让Android模拟器在我的64位Ubuntu12.04发行版上运行。首先,我必须安装ia32-libs,以解决以前(失败)尝试中遇到的一些早期问题。

然后我下载并安装了64位linux发行版。我导航到命令行上的android应用程序(SDK ),并运行它。我下载了Android工具和最新版本的Android操作系统。

我现在想运行emulator,但是当我运行时,我会得到以下错误:

代码语言:javascript
复制
myUser@myMachine:~/android-sdk/21.1/android-sdk-linux/tools$ ./emulator

emulator: ERROR: You did not specify a virtual device name, and the system
directory could not be found.

If you are an Android SDK user, please use '@<name>' or '-avd <name>'
to start a given virtual device (see -help-avd for details).

Otherwise, follow the instructions in -help-disk-images to start the emulator

当我运行./emulator -help-disk-images时,会得到包括以下内容的输出:

代码语言:javascript
复制
kernel-qemu      the emulator-specific Linux kernel image
ramdisk.img      the ramdisk image used to boot the system
system.img       the *initial* system image
userdata.img     the *initial* data partition image

It will also use the following writable image files:

userdata-qemu.img  the persistent data partition image
system-qemu.img    an *optional* persistent system image
cache.img          an *optional* cache partition image
sdcard.img         an *optional* SD Card partition image

snapshots.img      an *optional* state snapshots image

If you're neither using the SDK or the Android build system, you
can still run the emulator by explicitely providing the paths to
*all* required disk images through a combination of the following
options: -sysdir, -datadir, -kernel, -ramdisk, -system, -data, -cache
-sdcard and -snapstorage.

这很让人困惑。我见过YouTube示例中的人使用模拟器没有比./emulator -datadir=/some/path更多的东西。

所以我问:

  • 通过SDK、"Android构建系统“(??)和终端运行模拟器有什么区别,就像我在这里尝试的那样?
  • 为什么在某些情况下可以通过./emulator -datadir=/some/path运行模拟器,但是第二个窗口中的输出似乎需要4-8命令行参数?
  • 我应该在什么时候启动AVD经理并安装我的机器?

提前感谢!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-04-13 21:40:41

您必须在启动模拟器:之前创建AVD配置

代码语言:javascript
复制
android create avd -n <name> -t <targetID> [-<option> <value>] ... 

http://developer.android.com/tools/devices/managing-avds-cmdline.html#AVDCmdLine

,那么你准备好启动它了,

代码语言:javascript
复制
emulator -avd <avd_name> [<options>]

http://developer.android.com/tools/devices/emulator.html#starting

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15992631

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档