如何配置Android模拟器,一旦SDK安装 [英] How to configure Android Emulator once SDK is installed

查看:572
本文介绍了如何配置Android模拟器,一旦SDK安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让Android模拟器和我的6​​4位的Ubuntu 12.04发行版上运行。首先,我必须安装IA32-库,以解决一些我的previous曾遇到前面的问题(失败)的尝试。

I am trying to get the Android emulator up and running on my 64-bit Ubuntu 12.04 distro. First, I had to install ia32-libs to get around some earlier issues that I had encountered on previous (failed) attempts.

然后我下载并安装了64位的Linux发行版。我导航到机器人应用程序(SDK管理器)在命令行上,并运行它。我下载的Andr​​oid工具和Android操作系统的最新味道。

I then downloaded and installed the 64-bit linux distro. I navigated to the android application (SDK Manager) on the command line, and ran it. I downloaded Android Tools and the latest flavor of the Android OS.

我现在想运行模拟器,但是当我做,我得到以下错误:

I would now like to run emulator, but when I do, I get the following error:

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

当我运行 ./仿真器 - 帮助 - 磁盘映像我得到的输出,包括以下内容:

When I run ./emulator -help-disk-images I get output that includes the following:

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.

这是非常混乱。我已经看到了使用比罢了./模拟器-datadir = /一些/路径模拟器人民YouTube的例子。

This is very confusing. I've seen YouTube examples of people using the emulator with nothing more than ./emulator -datadir=/some/path.

于是我问:

  • 什么是通过SDK运行仿真器之间的差异,在 Android编译系统的(???),并通过像什么,我试图在这里的终端?
  • 为什么有可能在某些情况下运行通过模拟器./模拟器-datadir = /一些/路径,但在这第二个窗口中的输出似乎需要4 - 8命令行参数
  • 在哪一点我火起来的AVD管理,建立我的机器?
  • What's the difference between running the emulator via the SDK, the "Android build system" (???), and via the terminal like what I'm attempting here?
  • Why is it possible in some cases to run the emulator via ./emulator -datadir=/some/path, but the output in this 2nd window seems to require 4 - 8 command line arguments?
  • At what point do I fire up the AVD Manager and set up my machine?

在此先感谢!

推荐答案

启动仿真器之前,必须创建一个AVD配置:

android create avd -n <name> -t <targetID> [-<option> <value>] ... 

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

,然后你就可以启动它

emulator -avd <avd_name> [<options>]

http://developer.android.com/tool​​s/devices/emulator。 HTML#开始

这篇关于如何配置Android模拟器,一旦SDK安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆