在UWP中单击按钮时出现InvalidCast异常 [英] InvalidCast Exception on Button click in UWP

查看:69
本文介绍了在UWP中单击按钮时出现InvalidCast异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个UWP应用程序,其中有一个按钮,其中有一些代码。它在OS build> = 14393上工作。 

I have one UWP app in which I have one button in which some code is there. It is working fie on OS build >= 14393 . 

但是在像10586,10240这样的构建上它崩溃了。当我检查日志时,只要点击按钮就会说InvalidCastException。 

But on builds like 10586, 10240 it is crashing. When I checking the logs, it is just saying InvalidCastException as soon as button is clicked. 

Dev Box是14393所以它在我设置的框上工作正常debug。 

Dev Box is 14393 so it is working fine on box on which I have set up and debug. 

所有版本都只发布。 

All builds are releases only. 

你能帮忙吗? 

Can you help? 

谢谢,

Gourav

推荐答案

我的水晶球说你正在打电话给14393新的东西。在调用它之前,您可能需要使用API​​information类来检查它是否可用。既然你没有提供我不能提供的细节。再猜一下。
My crystal ball says you are calling something that was new in 14393. You'll probably need to use the APIinformation class to check if it is available before calling it. Since you didn't provide details I can't. guess any more specifically.


这篇关于在UWP中单击按钮时出现InvalidCast异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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