模拟器高级用法
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
除了基本的触摸屏手势和手机动作之外,您可能还需要在虚拟设备上测试应用的其他功能,例如,您可能想要模拟不同的位置或网络条件。本页将介绍模拟器高级功能以及使用 Android Studio 启动模拟器的不同方式。
本部分的其他页面介绍了使用模拟器的更多高级方式,这些方式需要您使用终端。这些更具体的用例包括:
对于大多数应用开发者来说,基本模拟器导航功能和本页上的各项功能可以满足您的测试需求。如需并排比较与模拟器交互时能够使用的模拟器功能,请参阅模拟器功能比较。
限制
Android 模拟器没有以下各项的虚拟硬件:
- 蓝牙
- NFC
- SD 卡插入/弹出
- 连接到设备的耳机
- USB
Wear OS 的手表模拟器不提供“Overview (Recent Apps)”按钮、方向键和指纹传感器。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Advanced emulator usage\n\nYou might need to test your app on a virtual device using more than\njust basic touch screen gestures and phone movements. For example, you might want to\nsimulate different locations or network conditions. This page covers advanced\nemulator features and different ways to launch the emulator with Android\nStudio.\n\nThe other pages in this section cover even more advanced ways to use the\nemulator, which require you to use the terminal. These more specialized use cases are:\n\n- If you aren't using Android Studio, you can [start the emulator from the command line](/studio/run/emulator-commandline).\n- To test features including fingerprint validation, or to change your virtual device's battery state, you can [send emulator console commands](/studio/run/emulator-console).\n- To have two emulator instances that can communicate to each other, or to set up other complex network architectures, you can [set up emulator networking](/studio/run/emulator-networking).\n\nFor most app developers, the\n[basic emulator navigation capabilities](/studio/run/emulator#navigate) and\nthe features on this page cover your testing needs. For a side-by-side\ncomparison of what you can do with the emulator depending on how you interact\nwith it, see [the emulator feature comparison](/studio/run/emulator-comparison).\n\nLimitations\n-----------\n\nThe Android Emulator doesn't include virtual hardware for the following:\n\n- Bluetooth\n- NFC\n- SD card insert/eject\n- Device-attached headphones\n- USB\n\nThe watch emulator for Wear OS doesn't provide the Overview (Recent Apps)\nbutton, D-pad, or fingerprint sensor."]]