适用于 Android 的 Zxing 条码库中缺少 com.google.zxing 包
我已经下载了 Android 版 Zxing 条码扫描仪代码,但在源代码中找不到 com.google.zxing 包。我认为该项目缺少库或 JAR 文件。有人可以帮我找到那个包裹吗?
这些是未解决的导入:
import com.google.zxing.BarcodeFormat;
import com.google.zxing.Result;
import com.google.zxing.ResultMetadataType;
import com.google.zxing.ResultPoint;
I have downloaded the Zxing Barcode Scanner code for Android, but I can't find the package com.google.zxing in the source code. I think there's a missing library or JAR file for the project. Can anybody help me find that package?
These are the unresolved imports:
import com.google.zxing.BarcodeFormat;
import com.google.zxing.Result;
import com.google.zxing.ResultMetadataType;
import com.google.zxing.ResultPoint;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您要查找的课程位于 核心模块。
The classes you are looking for are in the core module.
看到 download.zip 的 core 文件夹中的类但没有“core.jar”,真是令人头疼,所以这里是获取该 jar 文件的地方...
https://github.com/zxing/zxing/wiki/Getting-Started-Developing
(虽然我的版本是 4.7.5(显示在 zip 文件夹名称中),但它适用于版本 3.2.1
我将 core.jar 放在 Zxing 项目文件夹所在的 core 文件夹中,所以我之后
,(如果使用 Eclipse)
路径
这为我消除了所有丢失的错误,但在我阅读的 switch 语句中留下了错误,需要将其更改为if/else 语句,但那是另一个主题了。
What a headache to see the classes in the download.zip's core folder but there is no "core.jar", so here's where to get that jar file...
https://github.com/zxing/zxing/wiki/Getting-Started-Developing
(Though mine is 4.7.5 (shown on zip folder name) it worked with version 3.2.1
I put that core.jar where the Zxing project folder is, inside core folder so I wouldn't lose it.
After that, (if using Eclipse)
Path
This took all those missing errors away for me, but left errors in switch statements that I read needs to be changed to if/else statements, but that's for another topic.