gpt4 book ai didi

java.lang.NoSuchFieldError : No static field MAXICODE of type Lcom/google/zxing/BarcodeFormat; in class Lcom/google/zxing/BarcodeFormat; 错误

转载 作者:行者123 更新时间:2023-11-30 12:06:47 26 4
gpt4 key购买 nike

我想实现来自 https://github.com/dm77/barcodescanner 的条码扫描器库.像这样运行项目后出现错误

java.lang.NoSuchFieldError: No static field MAXICODE of type Lcom/google/zxing/BarcodeFormat; in class Lcom/google/zxing/BarcodeFormat; or its >superclasses (declaration of 'com.google.zxing.BarcodeFormat' appears in /data/app/com.myPro.simantra-2/base.apk:classes3.dex) at me.dm7.barcodescanner.zxing.ZXingScannerView.(ZXingScannerView.java:54) at com.myPro.ActivityMainMenu.onCreate(ActivityMainMenu.java:226)

调试后我发现错误是在代码运行时

mScannerView = new ZXingScannerView(this);

但如果我创建一个新项目并实现它,它会运行良好。

最佳答案

这个问题已经解决了。问题出在我导入到当前项目的旧项目/库中,我是旧编译的

core.jar

不包含

MAXICODE in Lcom/google/zxing/BarcodeFormat class.

所以解决这个问题只是简单的评论

implementation files('libs/jars/core.jar')

在渐变中。谢谢

关于java.lang.NoSuchFieldError : No static field MAXICODE of type Lcom/google/zxing/BarcodeFormat; in class Lcom/google/zxing/BarcodeFormat; 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55331492/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com