-
Notifications
You must be signed in to change notification settings - Fork 60
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
setAspectRatio on a null object #3
Comments
这个 mCameraViewMain 变量应该没有正确获取到,mCameraViewMain一直是null,所以一直报on a null object reference错误。 |
我按照demo里的写法移植到自己的app里,我发现这个情况一会儿有一会儿没有 |
大佬回复神速啊,还有个问题想请教一下 |
拍照的时候用OutputStream,然后在回调onImageSaved里面使用OutputStream取图像数据 |
感谢大佬,可以了! |
在onCameraOpen中设置AspectRatio
刚打开App就报错,
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.serenegiant.widget.AspectRatioSurfaceView.setAspectRatio(int, int)' on a null object reference
如果把setAspectRatio注释掉的话,会报下面的错
java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.SurfaceHolder com.serenegiant.widget.AspectRatioSurfaceView.getHolder()' on a null object reference
请问大佬这个是什么问题?怎么解决呀?
The text was updated successfully, but these errors were encountered: