您好无法解决此问题.
我已经在ImageAvailable回调中调用了imageReader.close,但仍然有错误:
java.lang.IllegalStateException: maxImages (1) has already been acquired,call #close before acquiring more.
我的代码在这里:
private ImageReader.OnImageAvailableListener imageAvailableListener = new ImageReader.OnImageAvailableListener() { @Override public void onImageAvailable(ImageReader reader) { Image img = mReader.acquireLatestImage(); mReader.close(); } };
PS.我也使用参数阅读器,但似乎没有解决问题