【问题标题】:Windows phone 8.1 app crashing while using libphonenumber-csharpWindows phone 8.1 应用程序在使用 libphonenumber-csharp 时崩溃
【发布时间】:2016-12-21 17:10:05
【问题描述】:

我正在尝试为我的 windows phone 项目使用 libphonenumber-csharp 库来验证国际电话号码。我已经在 nuget 包管理器控制台上使用以下命令安装了该库:

Install-Package libphonenumber-csharp 

我正在使用以下点击事件处理程序来测试库的功能:

private void buttonCall_Click(object sender, RoutedEventArgs e)
{
    String bdNumberStr = "0123456789";
    PhoneNumbers.PhoneNumberUtil phoneUtil = PhoneNumbers.PhoneNumberUtil.GetInstance();
    try
    {
        PhoneNumbers.PhoneNumber numberProto = phoneUtil.Parse(bdNumberStr, "BD");
    }
    catch (PhoneNumbers.NumberParseException exc)
    {
        Debug.WriteLine("NumberParseException was thrown: " + exc.Message);
    }
}

点击按钮后程序崩溃。事件处理函数未命中并引发异常。在输出窗口中,它显示如下内容:-

已加载“C:\Data\Programs{60688B3F-2E3D-46EE-B0DE-C1F3E22F0912}\Install\PhoneNumbers.DLL”。无法找到或打开 PDB 文件。

有人知道这里出了什么问题吗?

【问题讨论】:

    标签: windows-phone-8 windows-phone-8.1 nuget libphonenumber


    【解决方案1】:

    您不能使用这个包,这个库是为桌面构建的,而不是为 Windows Phone 或应用商店应用程序构建的。 您需要自己移植或寻找其他解决方案。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多