Create and launch a headless emulator with command line

 1.  Create AVD

android create avd --force -n Nexus_9_API_22 -t 1

 

  2.  Start AVD 

emulator -avd Nexus_9_API_22 -no-audio -no-window &

 

You can also refer to the official guide for more options when starting a emulator:

https://developer.android.com/studio/run/emulator-commandline.html

or use 

emulator -help

 

 

Other useful android command:

 

1. List all existing AVDs:

 emulator -list-avds

 

2. List the detail info of all the AVDs:

 android list avd

 

3. Delete an AVD:

 android delete avd -n {AVD_NAME}


4. Figure out the ABI name related to a certain SDK level

  In command line:

  $ android list target

  In Android Studio:

     Open the AVD manager -> Edit the AVD -> In AVD configuration wizard, click ‘Change’ for system image -> Find the ABI info

 

5. Install/Update SDK

e.g. Install the system images (x86) for the API (23) you can using

 $ android update sdk -a -u -t sys-img-x86-android-23

 to see a list of images ids:

 $ android list sdk -a -e

where -a stands for all and -e for extended, -t for filter and -u for no-ui

转载于:https://www.cnblogs.com/johnny987/p/6703120.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值