【发布时间】:2017-03-06 14:18:39
【问题描述】:
我正在使用 Visual Studio Community 2015 Update 3 和 Visual Studio Emulator for Android(API 级别 19)。一切正常,但自上次 Xamarin 更新以来,我无法部署到 Visual Studio Emulator。
我在 Visual Studio 中单击运行,它将应用程序部署到模拟器(我在应用程序抽屉中看不到它),然后启动应用程序。 但是应用程序立即关闭,并且 Visual Studio 在输出中说:
Could not connect to the debugger.
我已经尝试过的解决方案(没有成功):
- 在 Hyper-V 设置中启用迁移到具有不同处理器版本的物理计算机
- 在项目设置中禁用使用快速部署
编辑:在我的真实手机上,我可以调试这个应用程序。
EDIT2:Here's the logcat output
【问题讨论】:
-
这里的坏处是没有很好的指标来说明为什么会发生这种情况。我几乎总是去阅读故障排除指南以确保我是否遗漏了什么:msdn.microsoft.com/en-us/library/mt228282.aspx 但是这里的典型罪魁祸首是
Migrate to a physical computer with a different processor version.选项。您可能需要仔细检查您是否为此模拟器启用了它,因为该选项在新创建的模拟器中默认关闭。 -
感谢您的回答。我可以确认它肯定已启用。我想知道的是,在我的真手机上我可以毫无问题地调试这个应用程序。我所做的一切都是更新 xamarin 并且模拟器停止工作。我查看了
adb logcat以找出问题所在,但我看不出有什么问题。adb logcat的输出可能有帮助吗? -
随时将其添加到帖子中。每次我用 VS Android Emulators 调试问题时,
adb logcat似乎是一个红鲱鱼。 -
请看我的第二次编辑。希望你能看到我看不到的东西。
-
我唯一能看到的是
F/monodroid-debug( 1394): Error accepting stdout and stderr (127.0.0.1:8890): Address already in use,你可以检查一下它是否在使用中。 msdn.microsoft.com/en-us/library/mt228282.aspx#Anchor_2
标签: c# android xamarin visual-studio-2015 android-emulator