[英]How can I attach a virtual device/emulator to Visual Studio Xamarin Android project?
I created an Android app for Ice Cream Sandwich and added nothing to the default code (except changing the text of the "Hello World" message - I couldn't - or wouldn't - help myself). 我为Ice Cream Sandwich创建了一个Android应用程序,并且没有添加任何默认代码(除了更改“Hello World”消息的文本 - 我不能 - 或者不会 - 帮助自己)。
I mashed F5. 我把F5捣碎了。
Nada - no device attached. Nada - 没有附加设备。 The dropdown list says "No Devices Attached." 下拉列表显示“没有附加设备”。
So, I set one up via the "Open Android Emulator Manager" button that the Xamarin install added: 所以,我通过Xamarin安装添加的“Open Android Emulator Manager”按钮设置了一个:
I mashed F5 again; 我又把F5捣碎了; same problem. 同样的问题。 It said to pick a device from the dropdown list (I had forgotten to explicitly choose the one I just set up). 它说要从下拉列表中选择一个设备(我忘了明确选择我刚设置的那个)。 But...there's nothing in the list. 但是......列表中没有任何内容。 Why not? 为什么不?
It's working now; 它现在正在运作; I reckon it was not showing me my device for selection because some Android packages were downloading in the background (via the "Android SDK Manager", also added by Xamarin). 我估计它没有向我显示我的设备供选择,因为一些Android软件包在后台下载(通过“Android SDK Manager”,也由Xamarin添加)。
I feel transported back two years, when I was "messing around with" Eclipse/Android/Java. 当我“熟悉”Eclipse / Android / Java时,我感觉回来了两年。
Awesome that you got it working. 真棒,你让它工作。
I found that list doesnt always update and a restart of Visual Studio was the quickest way to get the emulator in the list of devices to debug against. 我发现列表并不总是更新,重新启动Visual Studio是将模拟器放入要调试的设备列表中的最快方法。
If that doesnt work, try restarting the ADB service. 如果这不起作用,请尝试重新启动ADB服务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.