问题描述
在诺基亚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?
推荐答案
这篇关于_accelerometer.DeviceId从MSDN中抛出示例应用程序中的异常(SDK bug?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!