我在Mac上,从终端开始进行Android开发。 我已经成功建立了HelloWorld项目,如今我正在尝试从Android模拟器中的命令行运行它。 哪一个命令为个人HelloWorld项目运行模拟器? linux
个人PATH中已经有了Android工具和平台工具。 android
编辑: bash
如何告诉模拟器从命令行运行个人HelloWorld项目? 我已经用ant构建了这个项目。 session
在这里,您能够经过命令行检查执行此命令的选项: app
emulator -avd avd_name [-option [value]] ... [-qemu args]
例如,我使用它以下所示: 工具
emulator -avd ICS_ARM -wipe-data -no-boot-anim -cpu-delay 0
打开命令提示符并转到<android-Home>\\sdk\\tools>emulator -avd <AVD_NAME>
spa
这里"emulator"
是用于打开Android虚拟设备的命令。 命令行
若是您严格尝试从命令行运行模拟器,请在OSX中尝试此操做。 code
"/Applications/Android Studio.app/sdk/tools/emulator" -avd <NAMEOFDEVICE> -netspeed full -netdelay none
您能够经过向.bash_profile添加别名并将其发送到后台做业来简化它。 ip
alias android='/Applications/Android\ Studio.app/sdk/tools/emulator <NAMEOFDEVICE> -netspeed full -netdelay none &'
让Bash知道这些变化。
source ~/.bash_profile
可用的avd名称列表
.android / AVD
/ SDK_PATH / tools / emulator -netdelay none -netspeed full -avd“AVD_NAME”
(Linux)在终端上复制并粘贴并以蓝色更改三个字段
/home/YouUser/Folder/adt-bundle-linux-x86_64-20140702/sdk/tools/emulator64-x86 -avd Android5.1.1 YouUser = user of session in linux Folder = path of folfer Android5.1.1 = You version of android in the emulator,for example (Android4.4.2)
你能够在你的文件夹中查看模拟器home cd /home/Youuser/.android/avd/