我正在使用GetBasicPropertiesAsync()
来计算手机上的可用空间(Windows Phone 8.1 RT应用程序)。
该方法运行正常,但有时会抛出InvalidOperationException
导致应用程序崩溃。我得到以下stacktrace:
Exception: System.InvalidOperationException: A method was called at an unexpected time.
(Exception from HRESULT: 0x8000000E), A method was called at an unexpected time.
(Exception from HRESULT: 0x8000000E), Message: A method was called at an unexpected time.
(Exception from HRESULT: 0x8000000E), Stacktrace:
at Windows.Storage.StorageFolder.GetBasicPropertiesAsync()
我无法找到此异常的原因。谁能指点一下呢?