Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错 #84

Open
tianguo1314 opened this issue Jan 18, 2023 · 5 comments
Open

报错 #84

tianguo1314 opened this issue Jan 18, 2023 · 5 comments

Comments

@tianguo1314
Copy link

java.lang.NegativeArraySizeException: -413100
at com.huawei.hms.scankit.aiscan.common.r.b(PlanarYUVLuminanceSource.java:5)
at com.huawei.hms.scankit.s.decode(IRemoteFrameDecoderDelegateImpl.java:10)
at com.huawei.hms.hmsscankit.api.IRemoteFrameDecoderDelegate$Stub.onTransact(IRemoteFrameDecoderDelegate.java:10)
at android.os.Binder.transact(Binder.java:921)
at com.huawei.hms.hmsscankit.api.IRemoteFrameDecoderDelegate$Stub$Proxy.decode(IRemoteFrameDecoderDelegate.java:10)
at com.huawei.hms.scankit.j.a(DecodeHandler.java:31)
at com.huawei.hms.scankit.j.handleMessage(DecodeHandler.java:8)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at com.huawei.hms.scankit.m.run(DecodeThread.java:4)

@xuxiapu
Copy link
Contributor

xuxiapu commented Jan 18, 2023

@tianguo1314
尊敬的开发者您好,
麻烦确认下以下信息,以便于我们更好的定位问题所在。
1.SDK版本号是什么?
2.采用以下哪种扫码模式 :Default View Mode、Customized View Mode、Bitmap Mode、MultiProcessor Mode。
3.是否能够复现?如何复现?
4.复现手机的型号、Android版本。

@tianguo1314
Copy link
Author

SDK:31
扫码模式:应该是默认的
是否能复现:必现
华为手机 Android10

附件为代码

ScanActivity.txt

@xuxiapu
Copy link
Contributor

xuxiapu commented Jan 18, 2023

@tianguo1314 您好,麻烦再提供一下完整的日志呢

获取运行APP到崩溃的日志
adb命令:adb logcat -v time > D:\logs\logcat.log

@tianguo1314
Copy link
Author

@xuxiapu
Copy link
Contributor

xuxiapu commented Jan 19, 2023

@tianguo1314 您好,从您的代码看您使用的是Customized View Mode扫码模式,
从日志中看您目前并未调用到相机,应该是使用不当导致的。
目前建议您参考示例代码:

Scan示例代码链接:https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Examples/android-sample-code-0000001050734383
Customized View 主要代码在DefinedActivity类中。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants