简体   繁体   English

使用Visual Studio 2017调试xamarin应用

[英]Debuging xamarin app using Visual Studio 2017

I'am new in Xamarin. 我是Xamarin的新手。 I want create new app using Xamarin in VS 2017. My steps: 1) Install VS 2017 - community (Choose Item "Mobile development with .NET") 2) File > New > Project 3) Visual C# 4) Android > Blank App (Android) 我想在VS 2017中使用Xamarin创建新应用。我的步骤:1)安装VS 2017-社区(选择项目“使用.NET移动开发”)2)文件>新建>项目3)Visual C#4)Android>空白应用( Android)

After thet I configuration AVD.

1) Tools > Android > Android Emulator Manager
2) Create
3) I set name "myAndroid"
4) Device = Nexus 6
5) Target = Android 7.1.1
6) CPU/ABI = Google APIs ARM (arm64 -vBa)
7) Skin = No skin
8) I check Use Host GPU

After configuration AVD I opened my Main.axml, and insert button. 配置AVD之后,我打开了Main.axml,然后插入按钮。 When i start debuging I see this message. 当我开始调试时,我会看到此消息。

在此处输入图片说明

I click Ok and waiting 5 minuts and see this. 我单击确定,等待5分钟,然后看到此消息。 在此处输入图片说明

I want start my project not this. 我不想开始我的项目。 Please helpe me. 请帮帮我。

The problem is that the android emulators run incredibly slow when not using hardware acceleration. 问题是,当不使用硬件加速时,Android仿真器的运行速度会非常慢。 For some reason this does not come with visual studio. 由于某些原因,Visual Studio并未提供此功能。 It's quick and easy to obtain this hardware acceleration. 获得这种硬件加速很容易。 Google HAXM and download the installer. Google HAXM并下载安装程序。 And as simple as that, the emulators will run fast enough that you can actually work on your project. 如此简单,仿真器将以足够快的速度运行,以使您可以实际处理项目。 However, you need to use the 86x bit versions of the emulators that came with visual studio for HAXM to work. 但是,您需要使用Visual Studio随附的86x位仿真器版本,HAXM才能正常工作。

As @Launch9 suggested - always use x86 emulators to debug. 正如@ Launch9所建议-始终使用x86模拟器进行调试。 You can download x86 image from Android SDK manager. 您可以从Android SDK管理器下载x86图像。 You can also use android virtual machines on Genymotion, since it can emulate different environmental conditions like connection quality, accelerometer and etc Last time I've checked they had free options for individuals. 您还可以在Genymotion上使用android虚拟机,因为它可以模拟不同的环境条件,例如连接质量,加速度计等。上次我检查了它们是否有针对个人的免费选项。 Main advice - always try your code on real devices. 主要建议-始终在真实设备上尝试您的代码。

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

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