android zxing 条码扫描获取绑定不匹配

发布于 2024-12-29 16:18:19 字数 1089 浏览 2 评论 0原文

我正在尝试从以下链接编译 zxing:

http://code.google.com/ p/zxing/source/checkout

但它没有得到编译。它给了我以下错误:

Bound mismatch: The generic method of(E, E...) of type EnumSet<E> is not applicable for the arguments (BarcodeFormat, BarcodeFormat, BarcodeFormat, BarcodeFormat). The inferred type BarcodeFormat is not a valid substitute for the bounded parameter <E extends Enum<E>>

我在以下链接中阅读了肖恩和里兹之间的对话:

http://groups.google.com/group/zxing/browse_thread/thread/2c775d28da3c8454/ac2eb3b45cd3f9bd?show_docid=ac2eb3b45cd3f9bd

的含义

You should not be including 
CaptureActivity in your code. You should be including core.jar.

我不明白如果我不包含 core.jar ,我将无法得到

import com.google.zxing.BarcodeFormat

所以我该如何解决这个问题。我正在尝试理解 zxing 作者编写的代码。我不想使用意图。

I am trying to compile zxing from the following link:

http://code.google.com/p/zxing/source/checkout

but it dont get compile. its giving me following error:

Bound mismatch: The generic method of(E, E...) of type EnumSet<E> is not applicable for the arguments (BarcodeFormat, BarcodeFormat, BarcodeFormat, BarcodeFormat). The inferred type BarcodeFormat is not a valid substitute for the bounded parameter <E extends Enum<E>>

I read the conversation between sean and riz at following link:

http://groups.google.com/group/zxing/browse_thread/thread/2c775d28da3c8454/ac2eb3b45cd3f9bd?show_docid=ac2eb3b45cd3f9bd

i didnt understand the meaning of

You should not be including 
CaptureActivity in your code. You should be including core.jar.

if i dont include core.jar , i will not be able to get

import com.google.zxing.BarcodeFormat

so how can i fix this problem. i am trying to understand the code written by zxing author. i dont want to use intent.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一人独醉 2025-01-05 16:18:19

我非常确定这意味着您实际上并没有编译从 Subversion 签出的代码,因为它确实可以编译。您可能将旧版本的 core/ 库(未使用 enum)与新版本的 android/ 代码混合在一起,这会导致做。

I am pretty sure this means you are not actually compiling the code you checked out from Subversion, since it definitely does compile. You probably mixed an old version of the core/ library (which did not use enum) with a new version of the android/ code, which does.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文