简体   繁体   English

Android模拟器 - 命令行构建

[英]Android Emulator - Command Line Building

Back again on Stack needing help from fellow Android Developers. 再次回到Stack需要其他Android开发者的帮助。 In my development environment im using a lot of command line building and management. 在我的开发环境中,我使用了大量的命令行构建和管理。 Currently im running into a issue where the Terminal "Using Mac OSX" when executing the command "emulator -avd nameOfemulator" the Terminal is still live. 目前我遇到一个问题,终端“使用Mac OSX”执行命令“emulator -avd nameOfemulator”终端仍然有效。

Example of Launching Emulator 启动仿真器的示例

启动模拟器

However even when the emulator is open and live, The Terminal is not let go to be able to execute additional command, I dont want to just open a new tab or window to have to execute my adb command's. 然而,即使模拟器是开放和实时的,终端也不会放过能够执行额外的命令,我不想只是打开一个新的选项卡或窗口来执行我的adb命令。 Currently i can closes the emulator and kill the live terminal/emulator command by a simple 'ctrl-C' however this defeats the purpose if the emulator is closed. 目前我可以关闭模​​拟器并通过简单的'ctrl-C'终止实时终端/模拟器命令但是如果模拟器关闭则这会失败。

Does anybody know of anyway of getting the terminal live again, either through a script, string of commands, different type of emulator's, etc. 有没有人知道再次通过脚本,命令串,不同类型的模拟器等使终端再次运行。

UPDATE UPDATE

Now running the following command emulator -avd NexusSeven & This emulator has the HAX Intel Hardware Acceleration enabled. 现在运行以下命令emulator -avd NexusSeven &此模拟器启用了HAX Intel硬件加速。 And shortly after the terminal becomes available again, The string " HAX is working and emulator runs in fast virt mode " is inputted into the command input and makes the terminal live again. 在终端再次可用之后不久,字符串“ HAX is working and emulator runs in fast virt mode ”被输入到命令输入中并使终端再次生效。 在单独的线程中运行Command后,输入HAX字符串使终端再次生效

Since MacOSX is just a fork of BSD Linux, the emulator can be run in background by appending the ampersand: 由于MacOSX只是BSD Linux的一个分支,因此可以通过附加&符号在后台运行模拟器:

emulator -avd NexusSeven &

To ignore all output, the following command will help: 要忽略所有输出,以下命令将有所帮助:

emulator -avd NexusSeven > /dev/null 2>&1 &

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM