`Camera` has no propType for native prop ... 解决方案
Posted zlzbt
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了`Camera` has no propType for native prop ... 解决方案相关的知识,希望对你有一定的参考价值。
`Camera` has no propType for native prop `RNCamera.detectedImageInEvent` of
小编在刚接触 react-native-camera 的时候,每一步都按照步骤来,终于android studio编译不报错了
启动react-native run-android结果走到调用camera的时候竟然又开始报错了,小编找了好久的方案终于知道解决办法了
!!! 竟然要改动node 引入的包里面的内容
去node_modules里面找到 RNCamera.js
在里面添加内容
const RNCamera = requireNativeComponent('RNCamera', Camera,
nativeOnly:
accessibilityComponentType: true,
accessibilityLabel: true,
accessibilityLiveRegion: true,
barCodeScannerEnabled: true,
touchDetectorEnabled: true,
googleVisionBarcodeDetectorEnabled: true,
faceDetectorEnabled: true,
textRecognizerEnabled: true,
importantForAccessibility: true,
onBarCodeRead: true,
onGoogleVisionBarcodesDetected: true,
onCameraReady: true,
onAudioInterrupted: true,
onAudioConnected: true,
onPictureSaved: true,
onFaceDetected: true,
onTouch: true,
onLayout: true,
onMountError: true,
onSubjectAreaChanged: true,
renderToHardwareTextureAndroid: true,
testID: true,
detectedImageInEvent: true, //这是我缺的 提示找不到什么就在这里面添加什么即可
cameraViewDimensions: true,
,
);
提示找不到什么就在这里面添加什么即可 ^.^
参考文档 https://github.com/react-native-camera/react-native-camera/issues/1161
以上是关于`Camera` has no propType for native prop ... 解决方案的主要内容,如果未能解决你的问题,请参考以下文章
Package 'build-essential' has no installation candidate
Flutter : PlatformException(no_available_camera, 没有可用于拍照的相机。, null, null)
ubuntu python opencv3 cv2.cv2 has no attribute 'face' 'cv2.face' has no attribute