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

横屏、竖屏一切换就崩溃 #67

Open
liangfengxixi opened this issue Dec 5, 2019 · 1 comment
Open

横屏、竖屏一切换就崩溃 #67

liangfengxixi opened this issue Dec 5, 2019 · 1 comment

Comments

@liangfengxixi
Copy link

错误日志:
java.lang.IllegalArgumentException: Crop rectangle does not fit within image data.
at com.google.zxing.PlanarYUVLuminanceSource.(PlanarYUVLuminanceSource.java:50)
at com.mylhyl.zxing.scanner.camera.CameraManager.buildLuminanceSource(CameraManager.java:374)
at com.mylhyl.zxing.scanner.decode.DecodeHandler.decode(DecodeHandler.java:95)
at com.mylhyl.zxing.scanner.decode.DecodeHandler.handleMessage(DecodeHandler.java:62)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at com.mylhyl.zxing.scanner.decode.DecodeThread.run(DecodeThread.java:107)

@liangfengxixi
Copy link
Author

找到原因了,我manifest设置了android:configChanges="orientation|keyboardHidden|screenSize"
横竖屏切换生命周期不会重新运行,导致onResume()里的重置没有触发,去掉这一行就可以了

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

1 participant