【问题标题】:UWP - Exception from HRESULT: 0x80131040UWP - HRESULT 异常:0x80131040
【发布时间】:2016-12-14 17:10:33
【问题描述】:

我正在尝试使用 oneSignal 推送通知 sdk 8.1+,但出现此异常。 看到这个:Windows Phone SDK Installation

这是否意味着我不能将它与 uwp 应用程序一起使用?

例外:

Could not load file or assembly 'System.ComponentModel.DataAnnotations,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of
its dependencies. The located assembly's manifest definition does not match
the assembly reference. (Exception from HRESULT: 0x80131040)

代码:

protected override void OnLaunched(LaunchActivatedEventArgs e) {   
    OneSignal.Init("OneSignal_App_Id", e, notificationOpened);
}

private void notificationOpened(string message, IDictionary<string, string> additionalData, bool isActive) {
    System.Diagnostics.Debug.WriteLine("notificationOpened:message:" + message);
    System.Diagnostics.Debug.WriteLine("notificationOpened:additionalData:" + additionalData);
    System.Diagnostics.Debug.WriteLine("notificationOpened:isActive:" + isActive);
}

【问题讨论】:

  • OneSignal 无法与 UWP(Windows 通用平台)应用正确配合。
  • @jkasten 您对 uwp 免费推送服务有什么建议吗?

标签: c# win-universal-app uwp onesignal


【解决方案1】:

要在 UWP 项目上使用 OneSignal WP 8.1 SDK,只需在发布模式下编译和测试项目!!

【讨论】:

    【解决方案2】:

    这是否意味着我不能将它与 uwp 应用程序一起使用?

    好像是这样,我们不能在 UWP 应用中使用它。

    您对uwp免费推送服务有什么建议吗?

    老实说,我不知道 UWP 是否还有其他免费推送服务,我可以建议将 Azure 应用服务中的移动应用与 Azure 通知中心一起使用。这里是官方文档Add push notifications to your Windows app。通知中心是免费的,但您需要 azure 帐户进行开发,这不是免费的。虽然可能会有一些成本,但 azure 通知中心更稳定、更高效。

    【讨论】:

      【解决方案3】:

      他们计划为 UWP 实施它,但没有任何时间表。我想我们能做的就是等待。

      【讨论】:

        猜你喜欢
        • 2012-02-26
        • 1970-01-01
        • 2016-03-14
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-07-03
        相关资源
        最近更新 更多