vision-camera-ocr
vision-camera-ocr copied to clipboard
feat: support react-native-vision-camera v3
Please, see the release page: releases
Download it via npm:
npm i @ismaelmoreiraa/vision-camera-ocr
Vision camera v4
for the vision camera v4 use this library from 3.0.0 and above
Just tested this on ios with v3 of vision camera and it's working good! I've been struggling to implement ml-kit text recognition frame processor for v3 for past 2 days and had no luck. Appreciate your work @ismaelsousa
Hello, How to update to this version?
@ismaelsousa sorry for the dumb question, but how do I use your changes in my project? Could you maybe publish a package with your updates?
@crly @DeluxeOwl you can directly install the branch on your deps. like this:
yarn add ismaelsousa/vision-camera-ocr#v2
@ismaelsousa sorry for the dumb question, but how do I use your changes in my project? Could you maybe publish a package with your updates?
I'd like to the owner publish a new version. I contacted him, let's see :)
@crly @DeluxeOwl you can directly install the branch on your deps. like this:
yarn add ismaelsousa/vision-camera-ocr#v2
Can not install
@ismaelsousa I'm running on Android。
Frame Processor threw an error: Exception in HostFunction: java.lang.IllegalArgumentException: Only JPEG and YUV_420_888 are supported now
Does it only support Only JPEG and YUV_420_888 formats?
@crly @DeluxeOwl you can directly install the branch on your deps. like this:
yarn add ismaelsousa/vision-camera-ocr#v2
Can not install
"vision-camera-ocr": "https://github.com/ismaelsousa/vision-camera-ocr/tree/94dc64b211b38976b654651c602554741c514a24"
@suwu150 Currently yes, you need to add:
<Camera
pixelFormat="yuv"
...
@crly @DeluxeOwl you can directly install the branch on your deps. like this:
yarn add ismaelsousa/vision-camera-ocr#v2
Can not install
"vision-camera-ocr": "https://github.com/ismaelsousa/vision-camera-ocr/tree/94dc64b211b38976b654651c602554741c514a24"
error https://github.com/ismaelsousa/vision-camera-ocr/tree/94dc64b211b38976b654651c602554741c514a24: Extracting tar content of undefined failed, the file appears to be corrupt: "Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?"
@crly @DeluxeOwl you can directly install the branch on your deps. like this:
yarn add ismaelsousa/vision-camera-ocr#v2
Can not install
"vision-camera-ocr": "https://github.com/ismaelsousa/vision-camera-ocr/tree/94dc64b211b38976b654651c602554741c514a24"
error https://github.com/ismaelsousa/vision-camera-ocr/tree/94dc64b211b38976b654651c602554741c514a24: Extracting tar content of undefined failed, the file appears to be corrupt: "Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?"
What is your node version? Mine is 16.14.0. Try this version. or The crudest way is to copy the source code to your own project
Awesome stuff ismael!
@crly @DeluxeOwl you can directly install the branch on your deps. like this:
yarn add ismaelsousa/vision-camera-ocr#v2
Can not install
@crly Please, try one of these methods: https://www.warp.dev/terminus/npm-install-from-github
I am encountering this error running the example:
Error: Unable to resolve module vision-camera-ocr from G:\vision-camera-ocr\example\src\App.tsx: vision-camera-ocr could not be found within the project or in these directories:
node_modules
..\node_modules
Thank you very much. Mine is already running, but I found that there is a lack of support for other languages. Currently, it only supports implementation 'com.google.mlkit:text-recognition:16.0.0'. Can other languages be supported in the future?
AwesomeProject/node_modules/vision-camera-ocr/android/build.gradle
// To recognize Chinese script
implementation 'com.google.mlkit:text-recognition-chinese:16.0.0'
AwesomeProject/node_modules/vision-camera-ocr/android/src/main/java/com/visioncameraocr/OCRFrameProcessorPlugin.kt
// val recognizer = TextRecognition.getClient(ChineseTextRecognizerOptions.LATIN_AND_CHINESE)
val recognizer = TextRecognition.getClient(ChineseTextRecognizerOptions.Builder().build())
Adding the above is valid, however is not configurable.
@suwu150 sure, could you create a PR for my repo with these changes? I'll be glad in merge it :)
I am encountering this error running the example:
Error: Unable to resolve module vision-camera-ocr from G:\vision-camera-ocr\example\src\App.tsx: vision-camera-ocr could not be found within the project or in these directories: node_modules ..\node_modules
@xulihang is this not working on js side?
I am encountering this error running the example:
Error: Unable to resolve module vision-camera-ocr from G:\vision-camera-ocr\example\src\App.tsx: vision-camera-ocr could not be found within the project or in these directories: node_modules ..\node_modules
@xulihang is this not working on js side?
Yes. The metro gives this error.
The pull request is failing in production mode in iOS
@joacub could you put the error here?
Hi! Using v2 example:
- What went wrong: Execution failed for task ':app:generateDebugBuildConfig'.
Failed to create G:\vision-camera-ocr\example\android\app\build\generated\source\buildConfig\debug\com\visioncameraocrexample
info Opening the app on Android...
> Task :app:mergeDebugJniLibFolders
> Task :react-native-worklets-core:bundleLibRuntimeToJarDebug
info JS server already running.
> Task :react-native-vision-camera:compileDebugKotlin
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\CameraDevicesManager.kt: (88, 19): Parameter 'eventName' is never used
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\CameraDevicesManager.kt: (91, 23): Parameter 'count' is never used
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\CameraView+Events.kt: (7, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\CameraView+Events.kt: (18, 28): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\CameraView+Events.kt: (18, 57): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\CameraView+Events.kt: (36, 28): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\CameraView+Events.kt: (36, 57): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\CameraView+Events.kt: (42, 28): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\CameraView+Events.kt: (42, 57): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\CameraView+Events.kt: (67, 28): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\CameraView+Events.kt: (67, 57): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\core\PreviewView.kt: (64, 5): Unreachable code
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\core\RecordingSession.kt: (48, 96): 'constructor MediaRecorder()' is deprecated. Deprecated in Java
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\extensions\CameraCharacteristics+getOutputSizes.kt: (22, 38): 'get(Int, Int): CamcorderProfile!' is deprecated. Deprecated in Java
w: G:\vision-camera-ocr\example\node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\extensions\CameraDevice+createCaptureSession.kt: (85, 12): 'createCaptureSessionByOutputConfigurations((Mutable)List<OutputConfiguration!>!, CameraCaptureSession.StateCallback!, Handler?): Unit' is deprecated. Deprecated in Java
info Installing the app...
> Task :gradle-plugin:compileKotlin UP-TO-DATE
> Task :gradle-plugin:compileJava NO-SOURCE
> Task :gradle-plugin:pluginDescriptors UP-TO-DATE
> Task :react-native-worklets-core:configureCMakeDebug[arm64-v8a]
> Task :gradle-plugin:processResources UP-TO-DATE
> Task :gradle-plugin:classes UP-TO-DATE
> Task :gradle-plugin:jar UP-TO-DATE
> Task :gradle-plugin:inspectClassesForKotlinIC UP-TO-DATE
> Configure project :react-native-vision-camera
[VisionCamera] react-native-worklets-core found, Frame Processors enabled!
> Task :app:buildCodegenCLI SKIPPED
> Task :app:generateCodegenSchemaFromJavaScript SKIPPED
> Task :app:generateCodegenArtifactsFromSchema SKIPPED
> Task :app:generatePackageList
> Task :app:preBuild
> Task :app:preDebugBuild
> Task :react-native-vision-camera:preBuild UP-TO-DATE
> Task :react-native-vision-camera:preDebugBuild UP-TO-DATE
> Task :react-native-worklets-core:prepareHeaders UP-TO-DATE
> Task :react-native-worklets-core:preBuild UP-TO-DATE
> Task :react-native-worklets-core:preDebugBuild UP-TO-DATE
> Task :react-native-worklets-core:compileDebugAidl NO-SOURCE
> Task :react-native-vision-camera:compileDebugAidl NO-SOURCE
> Task :visioncameraocr:preBuild UP-TO-DATE
> Task :visioncameraocr:preDebugBuild UP-TO-DATE
> Task :visioncameraocr:compileDebugAidl NO-SOURCE
> Task :app:compileDebugAidl NO-SOURCE
> Task :react-native-vision-camera:packageDebugRenderscript NO-SOURCE
> Task :react-native-worklets-core:packageDebugRenderscript NO-SOURCE
> Task :visioncameraocr:packageDebugRenderscript NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :react-native-vision-camera:writeDebugAarMetadata UP-TO-DATE
> Task :react-native-worklets-core:writeDebugAarMetadata UP-TO-DATE
> Task :visioncameraocr:writeDebugAarMetadata UP-TO-DATE
> Task :app:checkDebugAarMetadata UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :react-native-vision-camera:compileDebugRenderscript NO-SOURCE
> Task :react-native-vision-camera:generateDebugResValues UP-TO-DATE
> Task :react-native-vision-camera:generateDebugResources UP-TO-DATE
> Task :react-native-vision-camera:packageDebugResources UP-TO-DATE
> Task :react-native-worklets-core:compileDebugRenderscript NO-SOURCE
> Task :react-native-worklets-core:generateDebugResValues UP-TO-DATE
> Task :react-native-worklets-core:generateDebugResources UP-TO-DATE
> Task :react-native-worklets-core:packageDebugResources UP-TO-DATE
> Task :visioncameraocr:compileDebugRenderscript NO-SOURCE
> Task :visioncameraocr:generateDebugResValues UP-TO-DATE
> Task :visioncameraocr:generateDebugResources UP-TO-DATE
> Task :visioncameraocr:packageDebugResources UP-TO-DATE
> Task :app:mapDebugSourceSetPaths UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :react-native-vision-camera:extractDeepLinksDebug UP-TO-DATE
> Task :react-native-vision-camera:processDebugManifest UP-TO-DATE
> Task :react-native-worklets-core:extractDeepLinksDebug UP-TO-DATE
> Task :react-native-worklets-core:processDebugManifest UP-TO-DATE
> Task :visioncameraocr:extractDeepLinksDebug UP-TO-DATE
> Task :visioncameraocr:processDebugManifest UP-TO-DATE
> Task :app:processDebugMainManifest UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:processDebugManifestForPackage UP-TO-DATE
> Task :react-native-vision-camera:compileDebugLibraryResources UP-TO-DATE
> Task :react-native-vision-camera:parseDebugLocalResources UP-TO-DATE
> Task :react-native-worklets-core:parseDebugLocalResources UP-TO-DATE
> Task :react-native-worklets-core:generateDebugRFile UP-TO-DATE
> Task :react-native-vision-camera:generateDebugRFile UP-TO-DATE
> Task :react-native-worklets-core:compileDebugLibraryResources UP-TO-DATE
> Task :visioncameraocr:compileDebugLibraryResources UP-TO-DATE
> Task :visioncameraocr:parseDebugLocalResources UP-TO-DATE
> Task :visioncameraocr:generateDebugRFile UP-TO-DATE
> Task :app:processDebugResources UP-TO-DATE
> Task :react-native-vision-camera:generateDebugBuildConfig UP-TO-DATE
> Task :react-native-worklets-core:generateDebugBuildConfig UP-TO-DATE
> Task :react-native-worklets-core:javaPreCompileDebug UP-TO-DATE
> Task :react-native-worklets-core:compileDebugJavaWithJavac UP-TO-DATE
> Task :react-native-worklets-core:bundleLibCompileToJarDebug UP-TO-DATE
> Task :react-native-vision-camera:compileDebugKotlin UP-TO-DATE
> Task :react-native-vision-camera:javaPreCompileDebug UP-TO-DATE
> Task :react-native-vision-camera:compileDebugJavaWithJavac
> Task :visioncameraocr:generateDebugBuildConfig UP-TO-DATE
> Task :visioncameraocr:javaPreCompileDebug UP-TO-DATE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders NO-SOURCE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :react-native-vision-camera:mergeDebugShaders UP-TO-DATE
> Task :react-native-vision-camera:compileDebugShaders NO-SOURCE
> Task :react-native-vision-camera:generateDebugAssets UP-TO-DATE
> Task :react-native-vision-camera:packageDebugAssets UP-TO-DATE
> Task :react-native-worklets-core:mergeDebugShaders UP-TO-DATE
> Task :react-native-worklets-core:compileDebugShaders NO-SOURCE
> Task :react-native-worklets-core:generateDebugAssets UP-TO-DATE
> Task :react-native-worklets-core:packageDebugAssets UP-TO-DATE
> Task :visioncameraocr:mergeDebugShaders UP-TO-DATE
> Task :visioncameraocr:compileDebugShaders NO-SOURCE
> Task :visioncameraocr:generateDebugAssets UP-TO-DATE
> Task :visioncameraocr:packageDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets UP-TO-DATE
> Task :react-native-vision-camera:bundleLibCompileToJarDebug
> Task :app:compressDebugAssets UP-TO-DATE
> Task :app:processDebugJavaRes NO-SOURCE
> Task :react-native-vision-camera:processDebugJavaRes NO-SOURCE
> Task :react-native-worklets-core:processDebugJavaRes NO-SOURCE
> Task :react-native-worklets-core:bundleLibResDebug NO-SOURCE
> Task :visioncameraocr:processDebugJavaRes NO-SOURCE
> Task :react-native-vision-camera:bundleLibResDebug
> Task :app:checkDebugDuplicateClasses UP-TO-DATE
> Task :app:desugarDebugFileDependencies UP-TO-DATE
> Task :app:mergeExtDexDebug UP-TO-DATE
> Task :react-native-worklets-core:bundleLibRuntimeToJarDebug UP-TO-DATE
> Task :app:mergeDebugJniLibFolders UP-TO-DATE
> Task :react-native-vision-camera:bundleLibRuntimeToJarDebug
> Task :visioncameraocr:compileDebugKotlin
'compileDebugJavaWithJavac' task (current target is 11) and 'compileDebugKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
> Task :visioncameraocr:compileDebugKotlin FAILED
C/C++: CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
C/C++: CMake Error at G:/Android/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerABI.cmake:49 (try_compile):
C/C++: Failed to configure test project build system.
C/C++: Call Stack (most recent call first):
C/C++: G:/Android/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
C/C++: CMakeLists.txt:1 (project)
> Task :react-native-worklets-core:configureCMakeDebug[arm64-v8a] FAILED
67 actionable tasks: 62 executed, 5 up-to-date
info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-worklets-core:configureCMakeDebug[arm64-v8a]'.
> [CXX1429] error when building with cmake using G:\vision-camera-ocr\example\node_modules\react-native-worklets-core\android\CMakeLists.txt: -- Android: Targeting API '21' with architecture 'arm64', ABI 'arm64-v8a', and processor 'aarch64'
-- Android: Selected unified Clang toolchain
-- The C compiler identification is Clang 12.0.8
-- The CXX compiler identification is Clang 12.0.8
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: G:/Android/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Configuring incomplete, errors occurred!
C++ build system [configure] failed while executing:
@echo off
"G:\\Android\\cmake\\3.22.1\\bin\\cmake.exe" ^
"-HG:\\vision-camera-ocr\\example\\node_modules\\react-native-worklets-core\\android" ^
"-DCMAKE_SYSTEM_NAME=Android" ^
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ^
"-DCMAKE_SYSTEM_VERSION=21" ^
"-DANDROID_PLATFORM=android-21" ^
"-DANDROID_ABI=arm64-v8a" ^
"-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a" ^
"-DANDROID_NDK=G:\\Android\\ndk\\23.1.7779620" ^
"-DCMAKE_ANDROID_NDK=G:\\Android\\ndk\\23.1.7779620" ^
"-DCMAKE_TOOLCHAIN_FILE=G:\\Android\\ndk\\23.1.7779620\\build\\cmake\\android.toolchain.cmake" ^
"-DCMAKE_MAKE_PROGRAM=G:\\Android\\cmake\\3.22.1\\bin\\ninja.exe" ^
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=G:\\vision-camera-ocr\\example\\node_modules\\react-native-worklets-core\\android\\build\\intermediates\\cxx\\Debug\\1743614k\\obj\\arm64-v8a" ^
"-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=G:\\vision-camera-ocr\\example\\node_modules\\react-native-worklets-core\\android\\build\\intermediates\\cxx\\Debug\\1743614k\\obj\\arm64-v8a" ^
"-DCMAKE_BUILD_TYPE=Debug" ^
"-DCMAKE_FIND_ROOT_PATH=G:\\vision-camera-ocr\\example\\node_modules\\react-native-worklets-core\\android\\.cxx\\Debug\\1743614k\\prefab\\arm64-v8a\\prefab" ^
"-BG:\\vision-camera-ocr\\example\\node_modules\\react-native-worklets-core\\android\\.cxx\\Debug\\1743614k\\arm64-v8a" ^
-GNinja ^
"-DANDROID_STL=c++_shared" ^
"-DANDROID_TOOLCHAIN=clang" ^
"-DREACT_NATIVE_DIR=G:\\vision-camera-ocr\\example\\node_modules/react-native" ^
"-DJS_RUNTIME=hermes" ^
"-DHERMES_ENABLE_DEBUGGER=1"
from G:\vision-camera-ocr\example\node_modules\react-native-worklets-core\android
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error at G:/Android/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerABI.cmake:49 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
G:/Android/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
CMakeLists.txt:1 (project)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4m 58s
info Run CLI with --verbose flag for more details.
> Task :react-native-worklets-core:configureCMakeDebug[arm64-v8a] FAILED
C/C++: CMake Error at G:/Android/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
C/C++: The C++ compiler
C/C++: "G:/Android/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe"
C/C++: is not able to compile a simple test program.
C/C++: It fails with the following output:
C/C++: Change Dir: G:/vision-camera-ocr/example/node_modules/react-native-worklets-core/android/.cxx/Debug/1743614k/arm64-v8a/CMakeFiles/CMakeTmp
C/C++:
C/C++: Run Build Command(s):G:\Android\cmake\3.22.1\bin\ninja.exe cmTC_4f2da && [1/2] Building CXX object CMakeFiles/cmTC_4f2da.dir/testCXXCompiler.cxx.obj
C/C++: [2/2] Linking CXX executable cmTC_4f2da.exe
C/C++: FAILED: cmTC_4f2da.exe
C/C++: cmd.exe /C "cd . && G:\Android\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fexceptions -frtti -stdlib=libc++ CMakeFiles/cmTC_4f2da.dir/testCXXCompiler.cxx.obj -o cmTC_4f2da.exe -Wl,--out-implib,libcmTC_4f2da.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
C/C++: lld: error: unable to find library -lc++
C/C++: lld: error: unable to find library -lgcc_s
C/C++: lld: error: unable to find library -lgcc_s
C/C++: clang++: error: linker command failed with exit code 1 (use -v to see invocation)
C/C++: ninja: build stopped: subcommand failed.
C/C++:
C/C++:
C/C++:
C/C++: CMake will not be able to correctly generate this project.
C/C++: Call Stack (most recent call first):
C/C++: CMakeLists.txt:1 (project)
72 actionable tasks: 7 executed, 65 up-to-date
info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
e: G:\vision-camera-ocr\android\src\main\java\com\visioncameraocr\OCRFrameProcessorPlugin.kt: (17, 28): Unresolved reference: parsers
e: G:\vision-camera-ocr\android\src\main\java\com\visioncameraocr\OCRFrameProcessorPlugin.kt: (123, 27): Unresolved reference: Orientation
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':visioncameraocr:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-worklets-core:configureCMakeDebug[arm64-v8a]'.
> [CXX1429] error when building with cmake using G:\vision-camera-ocr\example\node_modules\react-native-worklets-core\android\CMakeLists.txt: -- Android: Targeting API '21' with architecture 'arm64', ABI 'arm64-v8a', and processor 'aarch64'
-- Android: Selected unified Clang toolchain
-- The C compiler identification is Clang 12.0.8
-- The CXX compiler identification is Clang 12.0.8
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: G:/Android/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Configuring incomplete, errors occurred!
-- The CXX compiler identification is Clang 12.0.8
-- Check for working CXX compiler: G:/Android/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
-- Check for working CXX compiler: G:/Android/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - broken
-- Configuring incomplete, errors occurred!
See also "G:/vision-camera-ocr/example/node_modules/react-native-worklets-core/android/.cxx/Debug/1743614k/arm64-v8a/CMakeFiles/CMakeOutput.log".
See also "G:/vision-camera-ocr/example/node_modules/react-native-worklets-core/android/.cxx/Debug/1743614k/arm64-v8a/CMakeFiles/CMakeError.log".
C++ build system [configure] failed while executing:
@echo off
"G:\\Android\\cmake\\3.22.1\\bin\\cmake.exe" ^
"-HG:\\vision-camera-ocr\\example\\node_modules\\react-native-worklets-core\\android" ^
"-DCMAKE_SYSTEM_NAME=Android" ^
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ^
"-DCMAKE_SYSTEM_VERSION=21" ^
"-DANDROID_PLATFORM=android-21" ^
"-DANDROID_ABI=arm64-v8a" ^
"-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a" ^
"-DANDROID_NDK=G:\\Android\\ndk\\23.1.7779620" ^
"-DCMAKE_ANDROID_NDK=G:\\Android\\ndk\\23.1.7779620" ^
"-DCMAKE_TOOLCHAIN_FILE=G:\\Android\\ndk\\23.1.7779620\\build\\cmake\\android.toolchain.cmake" ^
"-DCMAKE_MAKE_PROGRAM=G:\\Android\\cmake\\3.22.1\\bin\\ninja.exe" ^
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=G:\\vision-camera-ocr\\example\\node_modules\\react-native-worklets-core\\android\\build\\intermediates\\cxx\\Debug\\1743614k\\obj\\arm64-v8a" ^
"-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=G:\\vision-camera-ocr\\example\\node_modules\\react-native-worklets-core\\android\\build\\intermediates\\cxx\\Debug\\1743614k\\obj\\arm64-v8a" ^
"-DCMAKE_BUILD_TYPE=Debug" ^
"-DCMAKE_FIND_ROOT_PATH=G:\\vision-camera-ocr\\example\\node_modules\\react-native-worklets-core\\android\\.cxx\\Debug\\1743614k\\prefab\\arm64-v8a\\prefab" ^
"-BG:\\vision-camera-ocr\\example\\node_modules\\react-native-worklets-core\\android\\.cxx\\Debug\\1743614k\\arm64-v8a" ^
-GNinja ^
"-DANDROID_STL=c++_shared" ^
"-DANDROID_TOOLCHAIN=clang" ^
"-DREACT_NATIVE_DIR=G:\\vision-camera-ocr\\example\\node_modules/react-native" ^
"-DJS_RUNTIME=hermes" ^
"-DHERMES_ENABLE_DEBUGGER=1"
from G:\vision-camera-ocr\example\node_modules\react-native-worklets-core\android
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error at G:/Android/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerABI.cmake:49 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
G:/Android/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
CMakeLists.txt:1 (project)
CMake Error at G:/Android/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler
"G:/Android/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: G:/vision-camera-ocr/example/node_modules/react-native-worklets-core/android/.cxx/Debug/1743614k/arm64-v8a/CMakeFiles/CMakeTmp
Run Build Command(s):G:\Android\cmake\3.22.1\bin\ninja.exe cmTC_4f2da && [1/2] Building CXX object CMakeFiles/cmTC_4f2da.dir/testCXXCompiler.cxx.obj
[2/2] Linking CXX executable cmTC_4f2da.exe
FAILED: cmTC_4f2da.exe
cmd.exe /C "cd . && G:\Android\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fexceptions -frtti -stdlib=libc++ CMakeFiles/cmTC_4f2da.dir/testCXXCompiler.cxx.obj -o cmTC_4f2da.exe -Wl,--out-implib,libcmTC_4f2da.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
lld: error: unable to find library -lc++
lld: error: unable to find library -lgcc_s
lld: error: unable to find library -lgcc_s
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 32s
info Run CLI with --verbose flag for more details.
@joacub could you put the error here?
this is the error:
i really dont know that it is. just happened in production, in dev is working properly and nicely
@joacub sentry has a share Button. Could share the link?
@joacub sentry has a share Button. Could share the link?
dont see that, did you udpate the pull request with the new changes that @mrousavy suggest to you, now the ocr is not working at all with the changes that he did
@joacub sentry has a share Button. Could share the link?
dont see that, did you udpate the pull request with the new changes that @mrousavy suggest to you, now the ocr is not working at all with the changes that he did
@joacub I will. Maybe today, could you please use the same vision version of the example in this repo to continue working for you?
I'll publish this repo as well and start doing some releases to make it easy to maintain it
@joacub sentry has a share Button. Could share the link?
dont see that, did you udpate the pull request with the new changes that @mrousavy suggest to you, now the ocr is not working at all with the changes that he did
@joacub I will. Maybe today, could you please use the same vision version of the example in this repo to continue working for you?
I'll publish this repo as well and start doing some releases to make it easy to maintain it
Nice work sir, don’t worry we will waiting for your changes to keep publishing updates 🫡🫡
What went wrong?!
I've got the error below on Android on build:
/node_modules/vision-camera-ocr/android/src/main/java/com/visioncameraocr/OCRFrameProcessorPlugin.kt: (123, 27): Unresolved reference: Orientation
- What went wrong: Execution failed for task ':vision-camera-ocr:compileDebugKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction Compilation error. See log for more details
@ismaelsousa Thanks before.
What went wrong?!
I've got the error below on Android on build:
/node_modules/vision-camera-ocr/android/src/main/java/com/visioncameraocr/OCRFrameProcessorPlugin.kt: (123, 27): Unresolved reference: Orientation
- What went wrong: Execution failed for task ':vision-camera-ocr:compileDebugKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction Compilation error. See log for more details
@ismaelsousa Thanks before.
On:
"react": "18.1.0",
"react-native": "0.72.5",
"react-native-vision-camera": "^3.3.1",
"react-native-worklets-core": "^0.2.2",
"vision-camera-ocr": "github:ismaelsousa/vision-camera-ocr#v2"
Hi all, see the release 2.0.0
🎉
What went wrong?! I've got the error below on Android on build: /node_modules/vision-camera-ocr/android/src/main/java/com/visioncameraocr/OCRFrameProcessorPlugin.kt: (123, 27): Unresolved reference: Orientation
This comes from import com.mrousavy.camera.parsers.Orientation
Please, try to install the exact version of camera vision without the ˆ
symbol