android - adb 多个设备/模拟器

标签 android android-studio android-emulator

我 genymotion 模拟器和我的手机已连接,我想通过 wifi 运行和调试我的应用程序,我找到了这样做的指令,但是当我输入此代码时出现此错误:

adb tcpip 5555

我收到此错误:
错误:不止一个设备/模拟器

我怎样才能将我的设备设为默认或类似的东西来解决这个问题?

最佳答案

您可以根据 docs 向特定设备发送命令:

$ adb devices
List of devices attached
emulator-5554 device
emulator-5555 device

$ adb -s emulator-5555 do_your_command

另外,如果只有一个是模拟器或真实设备,您可以附加 -e-d并将命令发送给它:

If you have multiple devices available, but only one is an emulator, use the -e option to send commands to the emulator. Likewise, if there are multiple devices but only one hardware device attached, use the -d option to send commands to the hardware device.

关于android - adb 多个设备/模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50487796/

相关文章:

android - 如何在AndroidStudio中为android库的androidTest添加资源

java - Java中灰线没有解释如何查找问题?

android - 通过ndk连接套接字编程的错误

android - Camera Emulator "facing"行为异常

android - :app:transformClassesWithDexForDebug while compiling Firebase

Android native 运行时无法加载符号,即使它们实际上在加载的 .so 文件中找到

java - android 和 UDP 数据包的奇怪行为

android - 如何通过android访问远程服务器存储和检索文件

android - BrowseFragment 上的另一个行层

android - 如何检查我的应用程序是否仍在 Android 服务中运行?