【问题标题】:Xamarin bar code scanner ZXing.Net MobileXamarin 条码扫描器 ZXing.Net Mobile
【发布时间】:2017-12-05 10:51:33
【问题描述】:

我正在开发一个 Xamarin.Forms 应用程序。具体来说,我在关注 iOS 之前先关注 Android 平台。到目前为止,在我的应用程序中,我已经实现了登录和注册。当我在开发应用程序的登录和注册功能时,我所做的所有工作都在 PCL 中,它会编译成 android 和 iOS。

但是,我现在想实现条形码扫描。为此,我决定使用 ZXing.Net.Mobile for Forms 库。阅读文档后,它说以下 var scanPage = new ZXingScannerPage();。我已经在我的 Xamarin.Android 解决方案中下载了 ZXing.Net.Mobile for Forms,但是它无法找到该类。任何帮助或指导将非常感谢。

【问题讨论】:

  • 我通过安装ZXing.Net.Mobile表单解决了这个问题
  • 如果这对您有帮助,您可以将其标记为答案吗?

标签: xamarin.android


【解决方案1】:

我已经在我的 Xamarin.Android 解决方案中下载了 ZXing.Net.Mobile for Forms 但是它无法找到该类

如果你只是安装ZXing.Net.Mobile nuget 包,它是找不到类的。

您可以看到ZXing.Net.Mobile 源代码,ZXingScannerPage.cs 类包含在ZXing.Net.Mobile.Forms 中。所以你需要下载ZXing.Net.Mobile.Forms nuget 包:

那么你就可以开始使用ZXingScannerPage了:

var scanPage = new ZXing.Net.Mobile.Forms.ZXingScannerPage();

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-12-03
    • 1970-01-01
    • 1970-01-01
    • 2016-10-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-12
    相关资源
    最近更新 更多