react-native-mlkit
react-native-mlkit copied to clipboard
Cannot find native module 'RNMLKitObjectDetection'
Hi I am trying to integrate this library with an expo app, and when i run the app in expo-go i am getting Cannot find native module 'RNMLKitObjectDetection'. I am using the same example code posted in the site
This is my package.json
{
"name": "ml-kit-app",
"main": "expo-router/entry",
"version": "1.0.0",
"scripts": {
"start": "expo start",
"reset-project": "node ./scripts/reset-project.js",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"test": "jest --watchAll",
"lint": "expo lint"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/vector-icons": "^14.0.2",
"@infinitered/react-native-mlkit-object-detection": "^3.1.0",
"@react-navigation/bottom-tabs": "^7.2.0",
"@react-navigation/native": "^7.0.14",
"expo": "~52.0.43",
"expo-blur": "~14.0.3",
"expo-constants": "~17.0.8",
"expo-font": "~13.0.4",
"expo-haptics": "~14.0.1",
"expo-linking": "~7.0.5",
"expo-router": "~4.0.20",
"expo-splash-screen": "~0.29.22",
"expo-status-bar": "~2.0.1",
"expo-symbols": "~0.2.2",
"expo-system-ui": "~4.0.9",
"expo-web-browser": "~14.0.2",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-native": "0.76.9",
"react-native-gesture-handler": "~2.20.2",
"react-native-reanimated": "~3.16.1",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.4.0",
"react-native-web": "~0.19.13",
"react-native-webview": "13.12.5"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@types/jest": "^29.5.12",
"@types/react": "~18.3.12",
"@types/react-test-renderer": "^18.3.0",
"jest": "^29.2.1",
"jest-expo": "~52.0.6",
"react-test-renderer": "18.3.1",
"typescript": "^5.3.3"
},
"private": true
}
Same here.
Let me know if you find any solution please. I'll do the same if a solve this.
Is this on android or iOS? And are you running on device or in a simulator?
try to run it with development build, expo go doesn't support native modules @shehanGuruge @niloriver
Hey @mswat5 @trevor-coleman @shehanGuruge @niloriver! I already ran a development build, but I got the same result.
Cannot find native module 'RNMLKitDocumentScanner'
Did you find a way to solve it?
Are you trying to run it on iOS or Android? Document scanner is not supported on iOS.
This library cannot be used with Expo Go. Please use development builds.
Although not the original poster, the document scanner can also only be used on Android as per the Google APIs currently. This is not our doing, it's the only platform available for it right now