简体   繁体   English

Xamarin 项目未显示在 Visual Studio Android 仿真器上

[英]Xamarin project is not showing up on Visual Studio Android Emulator

Its my first time using an Android Emulator.这是我第一次使用 Android 仿真器。 And I have to debug Xamarin-101 project from Microsoft in Visual Studio 2019 but when I click debugging the emulator opening and I can use virtual phone on the emulator but I can't see the Xamarin project on the emulator.而且我必须在 Visual Studio 2019 中调试 Microsoft 的 Xamarin-101 项目,但是当我单击调试模拟器打开时,我可以在模拟器上使用虚拟电话,但在模拟器上看不到 Xamarin 项目。 Can anyone please give me an idea about it?谁能给我一个想法? (I tried to change the virtual device,API and did NuGet Updates) screenshot (我尝试更改虚拟设备,API 并做了 NuGet 更新)截图

Do you mean a Shortcut on your Emulators Home Screen?您是指模拟器主屏幕上的快捷方式吗? If yes - Visual Studio does not do that.如果是 - Visual Studio 不会这样做。 You can open the list of all installed apps by clicking somewhere in the lower of your emulators screen, holding the left mouse button and swiping upwards.您可以通过单击模拟器屏幕下方的某处,按住鼠标左键并向上滑动来打开所有已安装应用程序的列表。

Apart from that: If you start a debugging session your app will start automatically.除此之外:如果您开始调试 session 您的应用程序将自动启动。 If not, try to stop debugging, press the square on your emulator and whipe a potential running instance of your app.如果没有,请尝试停止调试,按模拟器上的方块并鞭打您的应用程序的潜在运行实例。 Then, repeat the process of starting your app.然后,重复启动应用程序的过程。 Maybe it helps to do a clean rebuild of your project in visual studio.也许它有助于在 Visual Studio 中对您的项目进行干净的重建。

I think what you might be stuck on is the same as what I encountered.我认为您可能会遇到的问题与我遇到的相同。 Many videos show that when running the emulator for the first time the app auto starts there, but when performing the same on my side I could not get the app on screen to save my life.许多视频显示,第一次运行模拟器时,应用程序会自动启动,但在我这边执行相同操作时,我无法在屏幕上显示应用程序以挽救我的生命。

In Visual Studio 2019 go to the debug tab and start the app from there, as long as you have the Android emulator set up it should start the emulator and then the app shortly after.在 Visual Studio 2019 go 中,转到调试选项卡并从那里启动应用程序,只要您设置了 Android 模拟器,它就应该启动模拟器,然后不久之后启动应用程序。 Then after that the green play button worked every time from there on.然后,从那里开始,绿色的播放按钮每次都起作用。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM