我已将 Flurry (http://www.flurry.com/) 集成到我的手机 7 应用程序中。唯一需要的代码是应用程序启动中的这一行
FlurryWP7SDK.Api.StartSession(ApiKeyValue);
但是,一旦命中该行,应用程序就会崩溃并出现 KeyNotFoundException。堆栈跟踪包括在下面。它似乎正在查询隔离存储设置,并在密钥不存在时失败。
有没有人遇到过这个错误,甚至成功地将flurry集成到Phone 7应用程序中?
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(String key)
at System.IO.IsolatedStorage.IsolatedStorageSettings.get_Item(String key)
at A.ca98fb38190f0d5cad84c67a779d17229.c204dba68825403c905efd7bfd067b17b(String ce0360de492f1f363775feaf6d6a8ced5, Object c8d4be677f7ee63f6756e13f285072523)
at A.c3f1105d518a239d73e2236200494de25.set_cfca54db015a16ab23de44b4d5c65e9a3(String c8d4be677f7ee63f6756e13f285072523)
at FlurryWP7SDK.Api.StartSession(String apiKey)
at AppName.App.Application_Launching(Object sender, LaunchingEventArgs e)
at Microsoft.Phone.Shell.PhoneApplicationService.FireLaunching()
at Microsoft.Phone.Execution.NativeEmInterop.FireOnLaunching()
编辑
在与 Flurry 支持讨论之后,似乎 KeyNotFoundException 被 Flurry 代码捕获。但是,如果您的调试器设置在抛出异常时中断,则无论如何您都将中断调试器。然后继续执行将起作用,因为异常被 Flurry 捕获和处理。
我无法验证这是否是解决方案,因为我不再有权访问指示错误的开发环境,但它似乎是一个可能的解决方案。