_accelerometer.DeviceId从MSDN中抛出示例应用程序中的异常(SDK bug?) [英] _accelerometer.DeviceId throws exception in sample app from MSDN (SDK bug?)

查看:79
本文介绍了_accelerometer.DeviceId从MSDN中抛出示例应用程序中的异常(SDK bug?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在诺基亚Lumia 1020(带WP8.1)上运行此示例应用程序时抛出异常:

An exception is thrown when running this sample app on a Nokia Lumia 1020 (with WP8.1):

http://code.msdn.microsoft.com/ wpapps / Background-sensors-eb7bb176

http://code.msdn.microsoft.com/wpapps/Background-sensors-eb7bb176

在第152行,表达式 

The exception is thrown on line 152, on the expression 

_accelerometer.DeviceId

异常:

System.Exception

Message:
Not enough storage is available to process this command. (Exception from HRESULT: 0x80070008)

StackTrace
   at Windows.Devices.Sensors.Accelerometer.get_DeviceId()
   at SDKTemplate.Scenario1.<ScenarioEnable>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__3(Object state)
   at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()




这在模拟器中不会发生。当我在我编写的另一个应用程序中访问DeviceId时会发生这种情况,因此示例应用程序本身似乎没有任何问题。

This does not happen in the emulator. It does happen when I access the DeviceId in another app I've written, so I doesn't seem to be anything wrong with the sample app itself.

我认为这是一个错误SDK或Lumia 1020的驱动程序?有什么办法可以避免这种情况吗? 

I assume this is a bug in the SDK or in the drivers for the Lumia 1020? Is there anything I can do to avoid this? 




推荐答案

我会在几台诺基亚设备上试一试,让你知道我是否可以复制!
I'll give this a shot on a couple of Nokia devices and let you know if I can repro!


这篇关于_accelerometer.DeviceId从MSDN中抛出示例应用程序中的异常(SDK bug?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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