Академический Документы
Профессиональный Документы
Культура Документы
ControltheEmulatorfromtheCommandLine|AndroidStudio
navigation
Android Studio
User Guide
emulator lets you develop and test Android applications without using a physical device.
Workow Basics
This page describes command line features that you can use with the Android Emulator. For information about
Manage Your Project
using the Android Emulator UI, see Using the Android Emulator.
Write Your App
Starting
and Stopping the Emulator
Build and Run Your App
During
development
and testing of your application, you install and run your application in the Android Emulator. You
Run Apps
on the Emulator
can launch the emulator as a standalone application from a command line, or you can run it from within your
Create and Manage Virtual Devices
Android Studio development environment. In either case, you specify the AVD con guration to load and any startup
Control
thewant
Emulator
fromas
thedescribed in this document.
options
you
to use,
Command Line
You can run your application on a single instance of the emulator or, depending on your needs, you can start
Run Apps on a Hardware Device
multiple emulator instances and run your application in more than one emulated device. You can use the emulator
built-in
commands to simulate GSM phone calling or SMS between emulator instances, and you can set up network
Create Run/Debug Congurations
redirection that allows emulators to send data to one another. For more information, see Telephony Emulation, SMS
Emulation,
and Build
Emulator Networking.
Congure Your
ToDebug
startYour
an instance
of the emulator from the command line, navigate to the tools/ folder of the SDK. Enter
App
emulator command like this:
Test Your App
emulatoravd<avd_name>[<options>]
Publish
Your App
This
initializes
the emulator, loads an AVD con guration and displays the emulator window.
Command
Linecan
Tools
Note: You
run multiple instances of the emulator concurrently, each with its own AVD con guration and
Release Notes
When you run your app from Android Studio, it installs and launches the app on your connected device or emulator
(launching the emulator, if necessary). You can specify emulator startup options in the Run/Debug dialog, in the
Target tab. When the emulator is running, you can issue console commands as described later in this document.
If you are not working in Android Studio, see Installing Applications on the Emulator for information about how to
install your application.
To stop an emulator instance, just close the emulator window.
1/1