简体   繁体   English

如何停止模拟应用程序的运行? (Android Studio,64位Win7 SP1)

[英]How to stop emulated app from running? (Android Studio, 64-bit Win7 SP1)

Running Your App -> Run on the Emulator clearly explains how to RUN an app from within Android Studio by launching the emulator. 运行您的应用程序->在模拟器上运行清楚地说明了如何通过启动模拟器在Android Studio中运行应用程序。

My question is - Once I've done that: "How should I STOP the emulated app from running?" 我的问题是-完成此操作后:“如何停止运行仿真应用程序?”

Thought #1 - Use the "Run -> Stop (Ctrl + F2)" option on Android Studio's menu. 思想#1-使用Android Studio菜单上的“运行->停止(Ctrl + F2)”选项。 But, when running my simple Hello-World-type application, that option is disabled. 但是,当运行我的简单Hello-World类型应用程序时,该选项被禁用。 Accordingly, Ctrl+F2 has no effect. 因此,Ctrl + F2无效。

Thought #2 - Close the emulator window, by right-clicking the emulator's icon in my task bar, and selecting "Close window." 思想#2-通过右键单击任务栏中的仿真器图标,然后选择“关闭窗口”,关闭仿真器窗口。 That closed the application all right, but then it seemed to leave things in a strange state. 那完全关闭了应用程序,但是随后似乎使事情陷入了一种奇怪的状态。 -- When I tried to run the application again, it gave an error and I had to recreate the project. -当我尝试再次运行该应用程序时,出现了错误,我不得不重新创建该项目。 That happened repeatably. 那件事反复发生。

Thought #3 - Try shutting down the (emulated) Android device. 思想#3-尝试关闭(模拟的)Android设备。 I tried that on Saturday evening: I held down the (emulated) Power button. 我在星期六晚上尝试过:我按下(模拟)电源按钮。 Clicked the option in the "Device options" window. 单击“设备选项”窗口中的选项。 It's now Monday morning, and it still says that it's "Shutting down...". 现在是星期一早上,它仍然说是“正在关机……”。

So, "How should I stop the emulated app from running?" 因此,“如何停止仿真应用程序运行?”

Thank you for any suggestions/help you can provide. 感谢您提供的任何建议/帮助。

Russell

I now see that I had asked the wrong question. 我现在看到我问错了问题。 I should have asked how to stop a running emulator. 我应该问过如何停止正在运行的模拟器。

Although I had been able to do so by right-clicking the emulator's entry in the task bar, and selecting "Close window", that had SEEMED to cause some problems. 尽管我可以通过右键单击任务栏中的仿真器条目并选择“关闭窗口”来做到这一点,但SEEMED可能会引起一些问题。 ["The selected device is incompatible" was displayed in the "Device Chooser" dialog.] So, I thought that was the wrong way to do it. [在“设备选择器”对话框中显示了“所选设备不兼容”。]因此,我认为这样做是错误的方法。

Since then, though, I think I've figured out that something else was causing my problems: 从那以后,尽管如此,我认为我发现其他原因导致了我的问题:

  1. I had an Android emulator process (emulator-arm.ese *32) which hadn't terminated properly. 我有一个Android模拟器进程(emulator-arm.ese * 32),该进程没有正确终止。

  2. When I selected another device, I hadn't given the (slow) Android emulator enough time to clear the "The selected device is incompatible" error(s). 当我选择另一台设备时,我没有给(慢)Android模拟器足够的时间来清除“所选设备不兼容”错误。

The problem process stayed in Windows' Task Manager after I shut down Android Studio, and Task Manager's failed to kill it. 我关闭Android Studio后,问题过程仍然留在Windows的任务管理器中,并且任务管理器无法将其杀死。 So I rebooted my PC, and now everything seems to work OK. 因此,我重新启动了PC,现在一切正常。

Use the multitask button on the emulator itself to open the list of running apps, then click the "X" to close your app. 使用模拟器本身上的多任务按钮打开正在运行的应用程序列表,然后单击“ X”关闭您的应用程序。

在此处输入图片说明

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 启动模拟器时,Android Studio Win7 Sp1错误adb.exe - Android Studio Win7 Sp1 error adb.exe on start Emulator Android SDK 未在 win 7 64 位上安装 - Android SDK not installing on win 7 64-bit 如何在 Embarcadero RAD Studio 10.3.3 中调试 android 64 位应用程序成为可能? - How to make it possible to debug android 64-bit app in Embarcadero RAD Studio 10.3.3? 如何在 linux mint 19 64 位中安装 android studio - how to install android studio in linux mint 19 64-bit Android 应用程序,如何支持 64 位架构? - Android app, How to support 64-bit architectures? 在64位Android设备上从Google Play商店安装应用时,如果该应用支持,该应用是否以64位安装? - When installing an app from the Google Play store on a 64-bit Android device, does the app install as 64-bit if the app supports it? 使用Pulse Mini在Win 7 64位上进行Android开发(华为) - Android development on Win 7 64-bit with Pulse Mini (Huawei) 如何在Android棒棒糖中以编程方式知道应用程序的进程是32位还是64位? - How to know a process of an app is 32-bit or 64-bit programmatically in Android lollipop? 由于缺少 64 位库,无法构建 64 位版本的 Ionic Android App - Can't build 64-bit version of Ionic Android App due to missing 64-bit library Windows 8 64位上的Android Studio找不到JVD - Android Studio on Windows 8 64-bit can't find JVD
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM