我正在制作一个反应本机应用程序来打开相机并扫描条形码/二维码,我正在使用反应本机相机套件,我的项目工作正常,但是,当我打开相机时,我收到一条警告日志:ReactImageView:图像源“null”不存在,我不知道为什么会发生这种情况,有人建议?
这是我的代码:
<CameraScreen
showFrame={true}
// Show/hide scan frame
scanBarcode={true}
// Can restrict for the QR Code only
laserColor={'red'}
// Color can be of your choice
frameColor={'red'}
// If frame is visible then frame color
colorForScannerFrame={'black'}
// Scanner Frame color
onReadCode={(event) =>
onBarcodeScan(event.nativeEvent.codeStringValue)
}
/>
Run Code Online (Sandbox Code Playgroud)