Xamarin.Forms应用程序将无法在Android设备上运行 [英] Xamarin.Forms app will not run on Android device

查看:114
本文介绍了Xamarin.Forms应用程序将无法在Android设备上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只需使用空白应用程序(Xamarin.Forms Portable)模板在Xamarin Studio 5.2.1中创建一个Xamarin.Forms应用程序.

Just created a Xamarin.Forms app in Xamarin Studio 5.2.1 using the Blank App (Xamarin.Forms Portable) template.

不进行任何代码更改,构建解决方案,并尝试通过右键单击我的.Android项目并选择运行方式"在连接的Android设备上运行它.

Made no code changes, built solution, attempted to run it on a connected Android device via right-click on my .Android project and choosing Run With.

我没有部署和启动应用程序,而是收到一条错误消息:执行失败:对象引用未设置为对象的实例."

Instead of deploying and starting the app, I get an error "Execution failed: Object reference not set to an instance of an object."

有人遇到这个问题了吗?

Has anyone run into this and figured out the problem?

推荐答案

找到了 https://bugzilla.xamarin.com/show_bug.cgi?id=21508 ,并推断没有为解决方案设置启动项目可能是导致异常的原因.

Found https://bugzilla.xamarin.com/show_bug.cgi?id=21508 and inferred that no startup project set for the solution could be the cause of the exception.

将我的.Android项目设置为启动项目,一切都很好.

Set my .Android project as startup project and all is well.

这篇关于Xamarin.Forms应用程序将无法在Android设备上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆