【问题标题】:not able to import Zxing Library in android project无法在 android 项目中导入 Zxing 库
【发布时间】:2015-07-20 07:37:02
【问题描述】:

我正在使用 zxing 发布的 build 3.2。从 git hub 下载并在 eclipse 中导入。导入后,我将 java 编译器设置为 1.7 并添加 core.jar,但库中仍然存在一些错误,请给我建议以解决它。

提前致谢。

【问题讨论】:

标签: android zxing


【解决方案1】:

通过 Intent 使用 zxing 不是更容易吗? (https://github.com/zxing/zxing/wiki/Scanning-Via-Intent)

IntentIntegrator integrator = new IntentIntegrator(yourActivity);
integrator.initiateScan();

public void onActivityResult(int requestCode, int resultCode, Intent intent) {
  IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
  if (scanResult != null) {
    // handle scan result
  }
  // else continue with any other code you need in the method
  ...
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-01-25
    • 1970-01-01
    • 2020-07-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多