如何开始MAC的Android模拟器AOSP [英] How to start Android AOSP emulator on MAC
问题描述
我已经下载并在每个Android源网站上的说明编译Android源$ C $ C( HTTP: //source.android.com/source/building.html )
I have downloaded and compiled Android source code per instructions on Android source website (http://source.android.com/source/building.html)
我选择了
$ lunch full-eng
模拟器工程建设,一切都编制了就好了。
an emulator engineering build and everything has compiled just fine.
然后,它说要推出一个仿真器内部的图像只需键入:
Then it says to launch the image inside an emulator just type:
The emulator is added to your path automatically by the build process. To run the emulator, type
$ emulator
好了,不知道它被添加到该路径。打字模拟器没有做任何事情。
Well, not sure it is added to the path. Typing emulator does not do anything.
但是,如果我去
out/host/darwin-x86/bin/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).
所以我很困惑......在这一点上我必须创建一个AVD?
如何创建一个AVD为这个形象到底是什么?
So I am confused ... at this point do I have to create an AVD ? How do I create an AVD for this image exactly ?
有没有人这样做对他们MAC可以提供我一些指导?
Has anyone done this on MAC can they supply me with some instructions ?
感谢
推荐答案
我不知道是否有在OSX任何区别,但它是在Linux上一个常见的错误。你建全AOSP后,建设过程中会添加&LT; AndroidBase&GT;输入/输出/主机/&LT;主拱&GT; /斌/模拟器
进入路径,但您重新启动计算机或打开另一个会话后,仿真器将不再在路径中。
I'm not sure if there is any difference on osx, but it is a common error on Linux. After you build the whole AOSP, the building process will add the <AndroidBase>/out/host/<host-arch>/bin/emulator
into the PATH, but after you restart your computer or open another session, emulator will no longer be in the path.
要解决你没有指定虚拟设备名,和系统
目录找不到的错误,你可以明确地设置ANDROID_PRODUCT_OUT指向磁盘映像目录一般情况下,磁盘映像目录将是&LT; AndroidBase&GT;输入/输出/目标/产品/通用
,所以
To fix the "You did not specify a virtual device name, and the system
directory could not be found" error, you can explicitly set ANDROID_PRODUCT_OUT to point to your disk image directory. In general, the disk image directory would be <AndroidBase>/out/target/product/generic
. So
$export ANDROID_PRODUCT_OUT=<ANDROID BASEDIR>/out/target/product/generic/
会有所帮助。
其实,你可以运行
. build/envsetup.sh
setpaths
这将做类似的工作适合你。
It will do a similar work for you.
这篇关于如何开始MAC的Android模拟器AOSP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!