What happened?
Error: No content provider:
Version
@react-native-ml-kit/barcode-scanning: version@react-native-ml-kit/face-detection: version@react-native-ml-kit/identify-languages: version@react-native-ml-kit/image-labeling: version@react-native-ml-kit/text-recognition: version@react-native-ml-kit/translate-text: version
Which ML Kit packages do you use?
- [ ] @react-native-ml-kit/barcode-scanning
- [ ] @react-native-ml-kit/face-detection
- [ ] @react-native-ml-kit/identify-languages
- [ ] @react-native-ml-kit/image-labeling
- [X] @react-native-ml-kit/text-recognition
- [ ] @react-native-ml-kit/translate-text
What platforms are you seeing this issue on?
System Information
System:
OS: Windows 10 10.0.19045
CPU: (12) x64 Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz
Memory: 587.97 MB / 15.88 GB
Binaries:
Node: 16.10.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 7.24.0 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 31, 33
Build Tools: 30.0.3, 31.0.0, 33.0.0
System Images: android-31 | Google Play Intel x86 Atom_64, android-33 | Google APIs Intel x86 Atom_64
Android NDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: AI-213.7172.25.2113.9123335
Visual Studio: Not Found
Languages:
Java: 11.0.17 - /c/Program Files/Eclipse Adoptium/jdk-11.0.17.8-hotspot/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.5 => 0.70.5
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to Reproduce
install react native mlkit and try to recognize text in android emulator
async function recognizeText() {
try {
const result = await TextRecognition.recognize(
"https://developers.google.com/static/ml-kit/vision/text-recognition/images/Wege_der_parlamentarischen_Demokratie.jpg"
);
console.log("A", JSON.stringify(result, null, 2));
for (let block of result.blocks) {
console.log("Block text:", block.text);
console.log("Block frame:", block.frame);
for (let line of block.lines) {
console.log("Line text:", line.text);
console.log("Line frame:", line.frame);
}
}
// resultFromFile.map(item => {
// item.lines
// });
setText(result.text);
} catch (err) {
console.log("Error", err);
}
}
bug