使用位置服务时XDE崩溃

时间:2013-03-23 05:49:41

标签: c# geolocation windows-phone-8

嘿,大家好奇,是否有人可以了解我的情况。

我正在编写一个应用程序,该应用程序利用位置服务访问Yelp并查找附近的商家。当我尝试在XDE.exe模拟器上进行调试时,我遇到了一个问题。

不确定如何修复它并且我试图使用我的GoogleFu但无济于事。

An exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.ni.dll but was not handled in user code

WinRT information: Your App does not have permission to access location data. Make sure you have defined ID_CAP_LOCATION in the application manifest and that on your phone, you have turned on location by checking Settings > Location.

If there is a handler for this exception, the program may be safely continued.

1 个答案:

答案 0 :(得分:0)

您是否在错误消息中查看了清单?如果没有该功能,您的应用在尝试拨打位置时会崩溃。