react-native-firebase-mlkit textRecognizerProcessImage 不是函数
react-native-firebase-mlkit textRecognizerProcessImage is not a function
安装 react native-firebase 核心应用程序和 mlkit 后。当我尝试使用函数 textRecognizerProcessImage.
时,mlkit 不起作用并失败
我关注了:https://invertase.io/oss/react-native-firebase/v6/ml-vision/quick-start 另外 ios 我安装了 pod 并查看了 mlkit 的下载方式。
但是,上面的错误发生在 android 和 ios 上。
有人知道吗?
编辑:我也可以使用 google-services.json
和 googleservice-info.plist
访问 firebase 项目
我的 package.json 中的相关部分。我正在为所有人使用最新版本。
(如您所见,我还使用了 /auth 和 /database,两者都可以正常工作!
"dependencies": {
"@react-native-firebase/app": "^6.0.0",
"@react-native-firebase/auth": "^6.0.0",
"@react-native-firebase/database": "^6.0.0",
"@react-native-firebase/ml-vision": "^6.0.0",
"react": "16.9.0",
"react-native": "0.61.1"
},
firebase.json:
{
"react-native": {
"ml_vision_face_model": true,
"ml_vision_ocr_model": true,
"ml_vision_barcode_model": true,
"ml_vision_label_model": true,
"ml_vision_image_label_model": true
}
}
简单的解决方案...
文档讨论
import vision from '@react-native-firebase/ml-vision';
导入视觉库。然而,
vision.anyFunctionHere 将不起作用,因为它不是实例。
解决方案是使用 vision().anyFunctionHere
(而不是花费我数小时和大量挫折的厄运括号-.-)
安装 react native-firebase 核心应用程序和 mlkit 后。当我尝试使用函数 textRecognizerProcessImage.
时,mlkit 不起作用并失败我关注了:https://invertase.io/oss/react-native-firebase/v6/ml-vision/quick-start 另外 ios 我安装了 pod 并查看了 mlkit 的下载方式。 但是,上面的错误发生在 android 和 ios 上。 有人知道吗?
编辑:我也可以使用 google-services.json
和 googleservice-info.plist
我的 package.json 中的相关部分。我正在为所有人使用最新版本。 (如您所见,我还使用了 /auth 和 /database,两者都可以正常工作!
"dependencies": {
"@react-native-firebase/app": "^6.0.0",
"@react-native-firebase/auth": "^6.0.0",
"@react-native-firebase/database": "^6.0.0",
"@react-native-firebase/ml-vision": "^6.0.0",
"react": "16.9.0",
"react-native": "0.61.1"
},
firebase.json:
{
"react-native": {
"ml_vision_face_model": true,
"ml_vision_ocr_model": true,
"ml_vision_barcode_model": true,
"ml_vision_label_model": true,
"ml_vision_image_label_model": true
}
}
简单的解决方案... 文档讨论
import vision from '@react-native-firebase/ml-vision';
导入视觉库。然而, vision.anyFunctionHere 将不起作用,因为它不是实例。
解决方案是使用 vision().anyFunctionHere
(而不是花费我数小时和大量挫折的厄运括号-.-)