Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Execution failed for task ':react-native-vision-camera:buildCMakeDebug[arm64-v8a]' #1283

Closed
3 of 4 tasks
scaralfred opened this issue Oct 16, 2022 · 82 comments · Fixed by #1466
Closed
3 of 4 tasks
Labels
🐛 bug Something isn't working

Comments

@scaralfred
Copy link

What were you trying to do?

Hello, I get this error when running the android build.

"react": "18.1.0",
"react-native": "0.70.3",
"react-native-reanimated": "^2.11.0"

Steps I made:

rm node_modules
npm install
cd android ./gradlew clean cd ..
npm react-native run-android

Reproduceable Code

No response

What happened instead?

Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-vision-camera:buildCMakeDebug[arm64-v8a]'.

Relevant log output

> Build command failed.
  Error while executing process /Users/admin/Library/Android/sdk/cmake/3.18.1/bin/ninja with arguments {-C /Users/admin/Desktop/AwesomeProject/node_modules/react-native-vision-camera/android/.cxx/Debug/42l6f1n6/arm64-v8a VisionCamera}
  ninja: Entering directory `/Users/admin/Desktop/AwesomeProject/node_modules/react-native-vision-camera/android/.cxx/Debug/42l6f1n6/arm64-v8a'
  [1/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o
  FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o 
  /Users/admin/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --gcc-toolchain=/Users/admin/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/admin/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DVisionCamera_EXPORTS -I../../../../build/fbjni-0.3.0-headers.jar -I../../../../build/third-party-ndk/boost -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/React -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/React/Base -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactAndroid/src/main/jni -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactCommon -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactCommon/callinvoker -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactCommon/jsi -I/Users/admin/Desktop/AwesomeProject/node_modules/hermes-engine/android/include -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/AnimatedSensor -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/Tools -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/SpecTools -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/SharedItems -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/Registries -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/LayoutAnimations -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/hidden_headers -I../../../../src/main/cpp -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/sdks/hermes/API -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/sdks/hermes/public -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID -DFOR_HERMES=true -DJS_RUNTIME_HERMES=1 -O0 -fno-limit-debug-info  -fPIC -std=gnu++14 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o -MF CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o -c ../../../../src/main/cpp/VisionCameraScheduler.cpp
  In file included from ../../../../src/main/cpp/VisionCameraScheduler.cpp:5:
  ../../../../src/main/cpp/VisionCameraScheduler.h:7:10: fatal error: 'Scheduler.h' file not found
  #include "Scheduler.h"
           ^~~~~~~~~~~~~
  1 error generated.
  [2/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JHashMap.cpp.o
  [3/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JFrameProcessorPlugin.cpp.o
  [4/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JImageProxy.cpp.o
  [5/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o
  FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o 
  /Users/admin/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --gcc-toolchain=/Users/admin/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/admin/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DVisionCamera_EXPORTS -I../../../../build/fbjni-0.3.0-headers.jar -I../../../../build/third-party-ndk/boost -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/React -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/React/Base -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactAndroid/src/main/jni -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactCommon -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactCommon/callinvoker -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactCommon/jsi -I/Users/admin/Desktop/AwesomeProject/node_modules/hermes-engine/android/include -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/AnimatedSensor -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/Tools -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/SpecTools -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/SharedItems -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/Registries -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/LayoutAnimations -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/hidden_headers -I../../../../src/main/cpp -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/sdks/hermes/API -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/sdks/hermes/public -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID -DFOR_HERMES=true -DJS_RUNTIME_HERMES=1 -O0 -fno-limit-debug-info  -fPIC -std=gnu++14 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o -MF CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o -c ../../../../src/main/cpp/VisionCamera.cpp
  In file included from ../../../../src/main/cpp/VisionCamera.cpp:3:
  ../../../../src/main/cpp/FrameProcessorRuntimeManager.h:13:10: fatal error: 'RuntimeManager.h' file not found
  #include "RuntimeManager.h"
           ^~~~~~~~~~~~~~~~~~
  1 error generated.
  [6/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o
  FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o 
  /Users/admin/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --gcc-toolchain=/Users/admin/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/admin/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DVisionCamera_EXPORTS -I../../../../build/fbjni-0.3.0-headers.jar -I../../../../build/third-party-ndk/boost -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/React -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/React/Base -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactAndroid/src/main/jni -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactCommon -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactCommon/callinvoker -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/ReactCommon/jsi -I/Users/admin/Desktop/AwesomeProject/node_modules/hermes-engine/android/include -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/AnimatedSensor -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/Tools -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/SpecTools -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/SharedItems -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/Registries -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/headers/LayoutAnimations -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native-reanimated/Common/cpp/hidden_headers -I../../../../src/main/cpp -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/sdks/hermes/API -I/Users/admin/Desktop/AwesomeProject/node_modules/react-native/sdks/hermes/public -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID -DFOR_HERMES=true -DJS_RUNTIME_HERMES=1 -O0 -fno-limit-debug-info  -fPIC -std=gnu++14 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o -MF CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o -c ../../../../src/main/cpp/FrameProcessorRuntimeManager.cpp
  In file included from ../../../../src/main/cpp/FrameProcessorRuntimeManager.cpp:5:
  ../../../../src/main/cpp/FrameProcessorRuntimeManager.h:13:10: fatal error: 'RuntimeManager.h' file not found
  #include "RuntimeManager.h"
           ^~~~~~~~~~~~~~~~~~
  1 error generated.
  [7/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/FrameHostObject.cpp.o
  [8/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/CameraView.cpp.o
  [9/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o
  ninja: build stopped: subcommand failed.

Device

Samsung S22

VisionCamera Version

2.14.1

Additional information

@scaralfred
Copy link
Author

Fixed downgrading react-native-reanimated from 2.11.0 to 2.10.0

@JamesGs1994
Copy link

JamesGs1994 commented Oct 16, 2022

I am mentioning my errors below as the same versions given above react-native-reanimated 2.10.0 are still facing the same error.
Task :react-native-vision-camera:buildCMakeDebug[arm64-v8a] FAILED
@manuelbieh @beebe4 @hirbod

@JamesGs1994
Copy link

JamesGs1994 commented Oct 16, 2022

My error is below

Task :react-native-vision-camera:configureCMakeDebug[arm64-v8a]
C/C++: debug|arm64-v8a :CMake Warning (dev) in CMakeLists.txt:
C/C++: debug|arm64-v8a : No project() command is present. The top-level CMakeLists.txt file must
C/C++: debug|arm64-v8a : contain a literal, direct call to the project() command. Add a line of
C/C++: debug|arm64-v8a : code such as
C/C++: debug|arm64-v8a : project(ProjectName)
C/C++: debug|arm64-v8a : near the top of the file, but after cmake_minimum_required().
C/C++: debug|arm64-v8a : CMake is pretending there is a "project(Project)" command on the first
C/C++: debug|arm64-v8a : line.
C/C++: debug|arm64-v8a :This warning is for project developers. Use -Wno-dev to suppress it.
C/C++: debug|arm64-v8a :CMake Warning at CMakeLists.txt:178 (message):
C/C++: debug|arm64-v8a : VisionCamera linking: FOR_HERMES=true

Task :react-native-vision-camera:buildCMakeDebug[arm64-v8a]
C/C++: ninja: Entering directory `D:\Ariveguru\fh-apps\tbotapp\node_modules\react-native-vision-camera\android.cxx\Debug\6y2c5x5i\arm64-v8a'
C/C++: In file included from ../../../../src/main/cpp/VisionCameraScheduler.cpp:5:
C/C++: ../../../../src/main/cpp/VisionCameraScheduler.h:7:10: fatal error: 'Scheduler.h' file not found
C/C++: In file included from ../../../../src/main/cpp/VisionCamera.cpp:3:
C/C++: ../../../../src/main/cpp/FrameProcessorRuntimeManager.h:13:10: fatal error: 'RuntimeManager.h' file not found
C/C++: In file included from ../../../../src/main/cpp/FrameProcessorRuntimeManager.cpp:5:
C/C++: ../../../../src/main/cpp/FrameProcessorRuntimeManager.h:13:10: fatal error: 'RuntimeManager.h' file not found

Task :react-native-vision-camera:buildCMakeDebug[arm64-v8a] FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
280 actionable tasks: 8 executed, 272 up-to-date

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-vision-camera:buildCMakeDebug[arm64-v8a]'.

Build command failed.
Error while executing process C:\Users\james\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C D:\Ariveguru\fh-apps\tbotapp\node_modules\react-native-vision-camera\android.cxx\Debug\6y2c5x5i\arm64-v8a VisionCamera}
ninja: Entering directory `D:\Ariveguru\fh-apps\tbotapp\node_modules\react-native-vision-camera\android.cxx\Debug\6y2c5x5i\arm64-v8a'
[1/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o
FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o
C:\Users\james\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=C:/Users/james/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/james/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DVisionCamera_EXPORTS -I../../../../build/fbjni-0.3.0-headers.jar -I../../../../build/third-party-ndk/boost -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/React -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/React/Base -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactAndroid/src/main/jni -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon/callinvoker -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon/jsi -ID:/Ariveguru/fh-apps/tbotapp/node_modules/hermes-engine/android/include -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/Tools -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/SpecTools -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/SharedItems -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/Registries -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/AnimatedSensor -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/LayoutAnimations -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/hidden_headers -I../../../../src/main/cpp -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/sdks/hermes/API -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/sdks/hermes/public -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID -DFOR_HERMES=true -DJS_RUNTIME_HERMES=1 -O0 -fno-limit-debug-info -fPIC -std=gnu++14 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o -MF CMakeFiles\VisionCamera.dir\src\main\cpp\VisionCameraScheduler.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o -c ../../../../src/main/cpp/VisionCameraScheduler.cpp
In file included from ../../../../src/main/cpp/VisionCameraScheduler.cpp:5:
../../../../src/main/cpp/VisionCameraScheduler.h:7:10: fatal error: 'Scheduler.h' file not found
#include "Scheduler.h"
^~~~~~~~~~~~~
1 error generated.
[2/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JHashMap.cpp.o
[3/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JFrameProcessorPlugin.cpp.o
[4/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JImageProxy.cpp.o
[5/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/FrameHostObject.cpp.o
[6/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/CameraView.cpp.o
[7/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o
FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o
C:\Users\james\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=C:/Users/james/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/james/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DVisionCamera_EXPORTS -I../../../../build/fbjni-0.3.0-headers.jar -I../../../../build/third-party-ndk/boost -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/React -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/React/Base -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactAndroid/src/main/jni -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon/callinvoker -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon/jsi -ID:/Ariveguru/fh-apps/tbotapp/node_modules/hermes-engine/android/include -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/Tools -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/SpecTools -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/SharedItems -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/Registries -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/AnimatedSensor -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/LayoutAnimations -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/hidden_headers -I../../../../src/main/cpp -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/sdks/hermes/API -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/sdks/hermes/public -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID -DFOR_HERMES=true -DJS_RUNTIME_HERMES=1 -O0 -fno-limit-debug-info -fPIC -std=gnu++14 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o -MF CMakeFiles\VisionCamera.dir\src\main\cpp\VisionCamera.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o -c ../../../../src/main/cpp/VisionCamera.cpp
In file included from ../../../../src/main/cpp/VisionCamera.cpp:3:
../../../../src/main/cpp/FrameProcessorRuntimeManager.h:13:10: fatal error: 'RuntimeManager.h' file not found
#include "RuntimeManager.h"
^~~~~~~~~~~~~~~~~~
1 error generated.
[8/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o
FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o
C:\Users\james\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=C:/Users/james/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/james/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DVisionCamera_EXPORTS -I../../../../build/fbjni-0.3.0-headers.jar -I../../../../build/third-party-ndk/boost -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/React -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/React/Base -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactAndroid/src/main/jni -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon/callinvoker -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon/jsi -ID:/Ariveguru/fh-apps/tbotapp/node_modules/hermes-engine/android/include -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/Tools -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/SpecTools -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/SharedItems -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/Registries -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/AnimatedSensor -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/LayoutAnimations -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/hidden_headers -I../../../../src/main/cpp -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/sdks/hermes/API -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/sdks/hermes/public -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID -DFOR_HERMES=true -DJS_RUNTIME_HERMES=1 -O0 -fno-limit-debug-info -fPIC -std=gnu++14 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o -MF CMakeFiles\VisionCamera.dir\src\main\cpp\FrameProcessorRuntimeManager.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o -c ../../../../src/main/cpp/FrameProcessorRuntimeManager.cpp
In file included from ../../../../src/main/cpp/FrameProcessorRuntimeManager.cpp:5:
../../../../src/main/cpp/FrameProcessorRuntimeManager.h:13:10: fatal error: 'RuntimeManager.h' file not found
#include "RuntimeManager.h"
^~~~~~~~~~~~~~~~~~
1 error generated.
[9/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o
ninja: build stopped: subcommand failed.

  • 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:
    java.lang.StackOverflowError (no error message)

  • 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.
==============================================================================

BUILD FAILED in 28s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-vision-camera:buildCMakeDebug[arm64-v8a]'.

Build command failed.
Error while executing process C:\Users\james\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C D:\Ariveguru\fh-apps\tbotapp\node_modules\react-native-vision-camera\android.cxx\Debug\6y2c5x5i\arm64-v8a VisionCamera}
ninja: Entering directory `D:\Ariveguru\fh-apps\tbotapp\node_modules\react-native-vision-camera\android.cxx\Debug\6y2c5x5i\arm64-v8a'
[1/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o
FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o
C:\Users\james\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=C:/Users/james/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/james/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DVisionCamera_EXPORTS -I../../../../build/fbjni-0.3.0-headers.jar -I../../../../build/third-party-ndk/boost -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/React -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/React/Base -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactAndroid/src/main/jni -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon/callinvoker -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon/jsi -ID:/Ariveguru/fh-apps/tbotapp/node_modules/hermes-engine/android/include -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/Tools -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/SpecTools -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/SharedItems -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/Registries -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/AnimatedSensor -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/LayoutAnimations -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/hidden_headers -I../../../../src/main/cpp -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/sdks/hermes/API -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/sdks/hermes/public -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID -DFOR_HERMES=true -DJS_RUNTIME_HERMES=1 -O0 -fno-limit-debug-info -fPIC -std=gnu++14 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o -MF CMakeFiles\VisionCamera.dir\src\main\cpp\VisionCameraScheduler.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o -c ../../../../src/main/cpp/VisionCameraScheduler.cpp
In file included from ../../../../src/main/cpp/VisionCameraScheduler.cpp:5:
../../../../src/main/cpp/VisionCameraScheduler.h:7:10: fatal error: 'Scheduler.h' file not found
#include "Scheduler.h"
^~~~~~~~~~~~~
1 error generated.
[2/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JHashMap.cpp.o
[3/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JFrameProcessorPlugin.cpp.o
[4/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JImageProxy.cpp.o
[5/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/FrameHostObject.cpp.o
[6/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/CameraView.cpp.o
[7/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o
FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o
C:\Users\james\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=C:/Users/james/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/james/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DVisionCamera_EXPORTS -I../../../../build/fbjni-0.3.0-headers.jar -I../../../../build/third-party-ndk/boost -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/React -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/React/Base -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactAndroid/src/main/jni -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon/callinvoker -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon/jsi -ID:/Ariveguru/fh-apps/tbotapp/node_modules/hermes-engine/android/include -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/Tools -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/SpecTools -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/SharedItems -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/Registries -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/AnimatedSensor -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/LayoutAnimations -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/hidden_headers -I../../../../src/main/cpp -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/sdks/hermes/API -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/sdks/hermes/public -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID -DFOR_HERMES=true -DJS_RUNTIME_HERMES=1 -O0 -fno-limit-debug-info -fPIC -std=gnu++14 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o -MF CMakeFiles\VisionCamera.dir\src\main\cpp\VisionCamera.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o -c ../../../../src/main/cpp/VisionCamera.cpp
In file included from ../../../../src/main/cpp/VisionCamera.cpp:3:
../../../../src/main/cpp/FrameProcessorRuntimeManager.h:13:10: fatal error: 'RuntimeManager.h' file not found
#include "RuntimeManager.h"
^~~~~~~~~~~~~~~~~~
1 error generated.
[8/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o
FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o
C:\Users\james\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=C:/Users/james/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/james/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DVisionCamera_EXPORTS -I../../../../build/fbjni-0.3.0-headers.jar -I../../../../build/third-party-ndk/boost -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/React -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/React/Base -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactAndroid/src/main/jni -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon/callinvoker -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/ReactCommon/jsi -ID:/Ariveguru/fh-apps/tbotapp/node_modules/hermes-engine/android/include -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/Tools -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/SpecTools -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/SharedItems -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/Registries -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/AnimatedSensor -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/headers/LayoutAnimations -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native-reanimated/Common/cpp/hidden_headers -I../../../../src/main/cpp -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/sdks/hermes/API -ID:/Ariveguru/fh-apps/tbotapp/node_modules/react-native/sdks/hermes/public -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID -DFOR_HERMES=true -DJS_RUNTIME_HERMES=1 -O0 -fno-limit-debug-info -fPIC -std=gnu++14 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o -MF CMakeFiles\VisionCamera.dir\src\main\cpp\FrameProcessorRuntimeManager.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o -c ../../../../src/main/cpp/FrameProcessorRuntimeManager.cpp
In file included from ../../../../src/main/cpp/FrameProcessorRuntimeManager.cpp:5:
../../../../src/main/cpp/FrameProcessorRuntimeManager.h:13:10: fatal error: 'RuntimeManager.h' file not found
#include "RuntimeManager.h"
^~~~~~~~~~~~~~~~~~
1 error generated.
[9/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o
ninja: build stopped: subcommand failed.

  • 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:
    java.lang.StackOverflowError (no error message)

  • 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.
==============================================================================

BUILD FAILED in 28s

at makeError (D:\Ariveguru\fh-apps\tbotapp\node_modules\execa\index.js:174:9)
at D:\Ariveguru\fh-apps\tbotapp\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (D:\Ariveguru\fh-apps\tbotapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\Ariveguru\fh-apps\tbotapp\node_modules\@react-native-community\cli\build\index.js:142:9)

info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

versions I use :---
"react": "18.1.0",
"react-native": "0.70.0",
"react-native-vision-camera": "^2.14.1",
"vision-camera-code-scanner": "^0.2.0",
"vision-camera-face-detector": "^0.1.8",
"vision-camera-object-detection": "^0.1.6"
"react-native-reanimated": "^2.10.0",

@daba-faith
Copy link

Same issue, has this been fixed?

1 similar comment
@MirUmair
Copy link

Same issue, has this been fixed?

@Jaybee4real
Copy link

Jaybee4real commented Oct 17, 2022

#1284 (comment)

Guys, try the above steps and see if it works for you

@GeandersonTodimo
Copy link

GeandersonTodimo commented Oct 17, 2022

Me too had the same issue.


Gradle 7.5.1

Build time: 2022-08-05 21:17:56 UTC
Revision: d1daa0cbf1a0103000b71484e1dbfe096e095918

Kotlin: 1.6.21
Groovy: 3.0.10
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 11.0.12 (Oracle Corporation 11.0.12+8-LTS-237)
OS: Windows 10 10.0 amd64

"react": "18.1.0",
"react-native": "0.70.3",
"react-native-hole-view": "^2.1.2",
"react-native-reanimated": "2.10.0",
"react-native-svg": "^13.4.0",
"react-native-vision-camera": "^2.14.1",
"vision-camera-code-scanner": "^0.2.0"

I had ran the follows commands inside folder android:
1º ./gradlew clean
2º ./gradlew.bat installDebug --warning-mode all
3º cd .. npx react-native run-android.

But it delayed so mush time and I always have to do the same because occur the problem frequently.

@Jaybee4real
Copy link

@GeandersonTodimo did you try the suggestion above?

@ArturoTorresMartinez
Copy link

Thank you guys so much for posting this issue, I just ran into it on a brand new react-native (0.70.3) project with nothing else installed besides this and it's dependencies.

@Jaybee4real I'll give your comment a try in a sec and I'll confirm if it works for anyone else having this issue

Thanks again, let's keep us posted about any updates on this thread!

@GeandersonTodimo
Copy link

GeandersonTodimo commented Oct 17, 2022

Me too had the same issue.

Gradle 7.5.1

Build time: 2022-08-05 21:17:56 UTC Revision: d1daa0cbf1a0103000b71484e1dbfe096e095918

Kotlin: 1.6.21 Groovy: 3.0.10 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 11.0.12 (Oracle Corporation 11.0.12+8-LTS-237) OS: Windows 10 10.0 amd64

"react": "18.1.0", "react-native": "0.70.3", "react-native-hole-view": "^2.1.2", "react-native-reanimated": "2.10.0", "react-native-svg": "^13.4.0", "react-native-vision-camera": "^2.14.1", "vision-camera-code-scanner": "^0.2.0"

I had ran the follows commands inside folder android: 1º ./gradlew clean 2º ./gradlew.bat installDebug --warning-mode all 3º cd .. npx react-native run-android.

But it delayed so mush time and I always have to do the same because occur the problem frequently.

I closed the "App" and "Node Console" and after install more some libs and came back the problem.

"axios": "^1.1.3",
"date-fns": "^2.29.3",
"react-native-config": "^1.4.11",
"react-native-fs": "^2.20.0",
"react-native-modalize": "^2.1.1",
"react-native-paper": "^4.12.5",
"react-native-vector-icons": "^9.2.0",

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-vision-camera:buildCMakeDebug[arm64-v8a]'.

Build command failed.
Error while executing process C:\Users\geanderson.silva\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C C:\Users\geanderson.silva\Documents\WorkSpace\AppTodimo\SIATDMobile\node_modules\react-native-vision-camera\android.cxx\Debug\363i6o1q\arm64-v8a VisionCamera}
ninja: Entering directory `C:\Users\geanderson.silva\Documents\WorkSpace\AppTodimo\SIATDMobile\node_modules\react-native-vision-camera\android.cxx\Debug\363i6o1q\arm64-v8a'
[1/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JHashMap.cpp.o
[2/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JFrameProcessorPlugin.cpp.o
[3/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JImageProxy.cpp.o
[4/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o
[5/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/FrameHostObject.cpp.o
[6/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o
FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o
C:\Users\geanderson.silva\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=C:/Users/geanderson.silva/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/geanderson.silva/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DVisionCamera_EXPORTS -I../../../../build/fbjni-0.3.0-headers.jar -I../../../../build/third-party-ndk/boost -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/React -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/React/Base -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactAndroid/src/main/jni -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactCommon -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactCommon/callinvoker -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactCommon/jsi -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/hermes-engine/android/include -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/AnimatedSensor -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/Tools -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/SpecTools -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/SharedItems -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/Registries -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/LayoutAnimations -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/hidden_headers -I../../../../src/main/cpp -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/sdks/hermes/API -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/sdks/hermes/public -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID -DFOR_HERMES=true -DJS_RUNTIME_HERMES=1 -O0 -fno-limit-debug-info -fPIC -std=gnu++14 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o -MF CMakeFiles\VisionCamera.dir\src\main\cpp\JSIJNIConversion.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o -c ../../../../src/main/cpp/JSIJNIConversion.cpp
In file included from ../../../../src/main/cpp/JSIJNIConversion.cpp:16:
In file included from C:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactAndroid/src/main/jni\react/jni/NativeMap.h:11:
../../../../build/third-party-ndk/folly\folly/dynamic.h:63:10: fatal error: 'boost/operators.hpp' file not found
#include <boost/operators.hpp>
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
[7/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o
FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o
C:\Users\geanderson.silva\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=C:/Users/geanderson.silva/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/geanderson.silva/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DVisionCamera_EXPORTS -I../../../../build/fbjni-0.3.0-headers.jar -I../../../../build/third-party-ndk/boost -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/React -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/React/Base -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactAndroid/src/main/jni -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactCommon -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactCommon/callinvoker -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactCommon/jsi -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/hermes-engine/android/include -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/AnimatedSensor -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/Tools -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/SpecTools -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/SharedItems -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/Registries -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/LayoutAnimations -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/hidden_headers -I../../../../src/main/cpp -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/sdks/hermes/API -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/sdks/hermes/public -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID -DFOR_HERMES=true -DJS_RUNTIME_HERMES=1 -O0 -fno-limit-debug-info -fPIC -std=gnu++14 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o -MF CMakeFiles\VisionCamera.dir\src\main\cpp\VisionCamera.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o -c ../../../../src/main/cpp/VisionCamera.cpp
In file included from ../../../../src/main/cpp/VisionCamera.cpp:3:
In file included from ../../../../src/main/cpp/FrameProcessorRuntimeManager.h:14:
In file included from ../../../../src/main/cpp/reanimated-headers/AndroidScheduler.h:8:
In file included from C:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactAndroid/src/main/jni\react/jni/CxxModuleWrapper.h:10:
In file included from C:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactAndroid/src/main/jni\react/jni/CxxModuleWrapperBase.h:13:
In file included from C:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactCommon\cxxreact/CxxModule.h:15:
../../../../build/third-party-ndk/folly\folly/dynamic.h:63:10: fatal error: 'boost/operators.hpp' file not found
#include <boost/operators.hpp>
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
[8/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o
FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o
C:\Users\geanderson.silva\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=C:/Users/geanderson.silva/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/geanderson.silva/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DVisionCamera_EXPORTS -I../../../../build/fbjni-0.3.0-headers.jar -I../../../../build/third-party-ndk/boost -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/React -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/React/Base -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactAndroid/src/main/jni -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactCommon -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactCommon/callinvoker -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactCommon/jsi -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/hermes-engine/android/include -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/AnimatedSensor -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/Tools -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/SpecTools -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/SharedItems -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/Registries -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/headers/LayoutAnimations -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native-reanimated/Common/cpp/hidden_headers -I../../../../src/main/cpp -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/sdks/hermes/API -IC:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/sdks/hermes/public -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID -DFOR_HERMES=true -DJS_RUNTIME_HERMES=1 -O0 -fno-limit-debug-info -fPIC -std=gnu++14 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o -MF CMakeFiles\VisionCamera.dir\src\main\cpp\FrameProcessorRuntimeManager.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o -c ../../../../src/main/cpp/FrameProcessorRuntimeManager.cpp
In file included from ../../../../src/main/cpp/FrameProcessorRuntimeManager.cpp:5:
In file included from ../../../../src/main/cpp/FrameProcessorRuntimeManager.h:14:
In file included from ../../../../src/main/cpp/reanimated-headers/AndroidScheduler.h:8:
In file included from C:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactAndroid/src/main/jni\react/jni/CxxModuleWrapper.h:10:
In file included from C:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactAndroid/src/main/jni\react/jni/CxxModuleWrapperBase.h:13:
In file included from C:/Users/geanderson.silva/Documents/WorkSpace/AppTodimo/SIATDMobile/node_modules/react-native/ReactCommon\cxxreact/CxxModule.h:15:
../../../../build/third-party-ndk/folly\folly/dynamic.h:63:10: fatal error: 'boost/operators.hpp' file not found
#include <boost/operators.hpp>
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
[9/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/CameraView.cpp.o
ninja: build stopped: subcommand failed.

  • 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:
    java.lang.StackOverflowError (no error message)

  • 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.
==============================================================================

BUILD FAILED in 2m 29s

at makeError (C:\Users\geanderson.silva\Documents\WorkSpace\AppTodimo\SIATDMobile\node_modules\execa\index.js:174:9)
at C:\Users\geanderson.silva\Documents\WorkSpace\AppTodimo\SIATDMobile\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Users\geanderson.silva\Documents\WorkSpace\AppTodimo\SIATDMobile\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\geanderson.silva\Documents\WorkSpace\AppTodimo\SIATDMobile\node_modules\@react-native-community\cli\build\index.js:142:9)

info Run CLI with --verbose flag for more details.

@ArturoTorresMartinez
Copy link

@GeandersonTodimo did you try the suggestion above?

Thanks for the suggestion, unfortunately the comment you linked to doesn't solve my issue, I appreciate it though.

I'm testing on a project with nothing but react-native-vision-camera, the frame processor and its dependencies so I doubt anything else is causing the error

@ArturoTorresMartinez
Copy link

Fixed downgrading react-native-reanimated from 2.11.0 to 2.10.0

Thanks for the suggestion, unfortunately it does not solve my issue with the project I described above

@m-maaz-azhar
Copy link

I am also facing the same issue, has this been fixed?

@ArturoTorresMartinez
Copy link

I am also facing the same issue, has this been fixed?

I am afraid not yet, I'm keeping this thread posted in case I find a solution

@GeandersonTodimo
Copy link

@ArturoTorresMartinez in my project if I remove these lib, exemplo below came back working. But I also need them to scann barr codes and i would like to working as others libs without problems during build.

yarn remove react-native-vision-camera
yarn remove vision-camera-code-scanner react-native-hole-view

@ArturoTorresMartinez
Copy link

@ArturoTorresMartinez in my project if I remove these lib, exemplo below came back working. But I also need them to scann barr codes and i would like to working as others libs without problems during build.

yarn remove react-native-vision-camera yarn remove vision-camera-code-scanner react-native-hole-view

@GeandersonTodimo Indeed you are right, that seems to be the root of the issue

One not-so-great alternative is to fall back to the package that sent most of us here (react-native-camera)
It sure needs a few tweaks with patch-package but if anyone is in a rush to get a scanner working I believe that's one way to go about it :/

@jpmmartin
Copy link

I suppose that this library will work for some specific version and that it will break with some update, currently I created a new project and I have this same problem, can someone advise me with which version this works

@irodeanu
Copy link

@ArturoTorresMartinez in my project if I remove these lib, exemplo below came back working. But I also need them to scann barr codes and i would like to working as others libs without problems during build.
yarn remove react-native-vision-camera yarn remove vision-camera-code-scanner react-native-hole-view

@GeandersonTodimo Indeed you are right, that seems to be the root of the issue

One not-so-great alternative is to fall back to the package that sent most of us here (react-native-camera) It sure needs a few tweaks with patch-package but if anyone is in a rush to get a scanner working I believe that's one way to go about it :/

I think is the best solution.

@ikuruzum
Copy link

@ArturoTorresMartinez in my project if I remove these lib, exemplo below came back working. But I also need them to scann barr codes and i would like to working as others libs without problems during build.

yarn remove react-native-vision-camera yarn remove vision-camera-code-scanner react-native-hole-view

i can say it's not about react-native-hole-view, i don't use that but i get same error

@wasiquehaider
Copy link

wasiquehaider commented Oct 18, 2022

I fixed it by following the below steps :)

- watchman watch-del-all

- yarn cache clean --force
- 
npm cache clean --force # optional - in case you have used npm
- 
rm -rf node_modules/
rm yarn.lock
- 
rm package-lock.json # optional - in case you have used npm

- rm -rf $TMPDIR/metro-*

- rm -rf $TMPDIR/haste-*
- 
yarn install / npm install
- 
yarn start --reset-cache
- cd ios && rm -rf Podfile.lock && rm -rf Pods/ && pod install --verbose

@thuantvDr4
Copy link

thuantvDr4 commented Oct 18, 2022

yeah! i confirm this solution, because I faced the issue and i fixed by use it

you should use
"react-native-reanimated": "2.10.0",
for
"react-native-vision-camera": "2.14.1",

remember, remove node_modules and gradlew clean, and then run
yarn android

wish successful for you !

@ikuruzum
Copy link

I fixed it by following the below steps :)

- watchman watch-del-all

- yarn cache clean --force
- 
npm cache clean --force # optional - in case you have used npm
- 
rm -rf node_modules/
rm yarn.lock
- 
rm package-lock.json # optional - in case you have used npm

- rm -rf $TMPDIR/metro-*

- rm -rf $TMPDIR/haste-*
- 
yarn install / npm install
- 
yarn start --reset-cache
- cd ios && rm -rf Podfile.lock && rm -rf pods && pod install --verbose

that fixed my issue too

@ikuruzum
Copy link

oh wait, it didn't

@jwoodmansey
Copy link

We were seeing this in our "react-native": "0.70.3" spike, but all is good on 0.69.6, so if you can try downgrading.

@ikuruzum
Copy link

i tried react native 0.68.2, 0.70.3 and 0.69.5, i assume it's not about react-native version

@jwoodmansey
Copy link

i tried react native 0.68.2, 0.70.3 and 0.69.5, i assume it's not about react-native version

Damn, I will try work out if we changed anything else.

@Fari056
Copy link

Fari056 commented Oct 18, 2022

cd android => ./gradlew clean
delete node_module
"react-native-reanimated": "2.10.0",
for
"react-native-vision-camera": "2.14.1",
if you have '^' this sign with versions remove it first
yarn / npm i

@olegmilan
Copy link

yeah! i confirm this solution, because I faced the issue and i fixed by use it

you should use "react-native-reanimated": "2.10.0", for "react-native-vision-camera": "2.14.1",

remember, remove node_modules and gradlew clean, and then run yarn android

wish successful for you !

Indeed, downgrading react-native-reanimated from 2.11.0 to 2.10.0 fixed issue for me. I got MacBook Pro with M1 Pro chip.
Thanks. dude

cc: @scaralfred

@andreacab2
Copy link

None of the solutions mentioned here work on our end. What's even more surprising is that within our team, some have the issue and others don't. As I don't know how to get more info when that error happens and not much is given from the log (we use nx), I am unsure how to dig deeper..

@andreacab2
Copy link

andreacab2 commented Jan 12, 2023

I had to do

softwareupdate --install-rosetta

on a mac M1 to fix this issue.

We realized the cmake command was returning an error stating "bad CPU"
Try:

~/Library/Android/sdk/cmake/3.18.1/bin/cmake --version

Make sure your command with cmake and the corresponding version does not throw an error.

Thanks to @edwinw6 !

@Gureen
Copy link

Gureen commented Jan 23, 2023

Hello there ! My first post ever.
Found a possible solution for some user's.
Short story:
Tried everything here... Nothing worked. My colleague and I got the same error, while colleagues that tested building on theirs
had no issues.
Anyways. The way I fixed it for my colleague and me was by this order.

1)Open your project in Android Studio. ( wait for him to index the project etc)
2)Open File -> Settings -> search Android SDK -> under Android SDK pick SDK Tools uninstall all NDK extensions you have installed , then uninstall all CMake extensions you have installed
By uninstalling I mean, uncheck boxes from all versions, press Apply then Ok.
3)After that open settings again and install version NDK 25.08775105 and CMake 3.22.1
Check those two boxes Apply -> Ok
4) File -> Invalidate Caches -> check both boxes, invalidate and restart
5) No matter if you build on Virutal or Physical device app, uninstall the app from mobile before building project
6)Build && #pray

Optional
6*) I recommend to do that on freshly cloned project, or if you do not use git/bitbucket... only local -> delete/install modules

Pic1
Pic2
Pic3
Pic4

If you need my versions
"react": "18.1.0"
"react-native": "0.70.3"
"react-native-reanimated": "^2.11.0"
"react-native-vision-camera": "^2.15.2"
"vision-camera-code-scanner": "^0.2.0"

android/build.gradle

buildscript {
ext {
googlePlayServicesVersion = '18.0.0'
firebaseMessagingVersion = '21.1.0'

    // other settings
    buildToolsVersion = '31.0.0'
    minSdkVersion = 21
    compileSdkVersion = 31
    targetSdkVersion = 31
    VisionCameraCodeScanner_targetSdkVersion = 31
    VisionCameraCodeScanner_compileSdkVersion = 31

    if (System.properties['os.arch'] == 'aarch64') {
        // For M1 Users we need to use the NDK 24 which added support for aarch64
        ndkVersion = '24.0.8215888'
    } else {
        // Otherwise we default to the side-by-side NDK version from AGP.
        ndkVersion = '21.4.7075529'
    }
}

@DanielGannage
Copy link

@Gureen This solution makes sense, do you know if it works for RN 0.71.1?

@Gureen
Copy link

Gureen commented Jan 27, 2023

@Gureen This solution makes sense, do you know if it works for RN 0.71.1?

Sorry, no I only tried with my version. But the point is when you reinstall thoose 2 extensions, it just re-creates a good path for building. That is my 2 cents

@ycdaskin
Copy link

I had to do

softwareupdate --install-rosetta

on a mac M1 to fix this issue.

We realized the cmake command was returning an error stating "bad CPU" Try:

~/Library/Android/sdk/cmake/3.18.1/bin/cmake --version

Make sure your command with cmake and the corresponding version does not throw an error.

Thanks to @edwinw6 !

yes, this makes sense. i use m2 chip mac and this solution worked for me.

@alexey-kuznetsov
Copy link

Is there any solution without downgrading "reanimated"? I need reanimated 2.14 version for some other packages and if I downgrade it I get errors from other packages. Maybe somebody knows what can I change in this package to make it compatible with the latest reanimated?

@alexey-kuznetsov
Copy link

I found workaround for my project. I don't need frame processors, but my project contains react-native-reanimated for some other features. So I just added disableFrameProcessors=true line to gradle.properties file in my project and everything works good now.

@dondxniel
Copy link

cd android => ./gradlew clean delete node_module "react-native-reanimated": "2.10.0", for "react-native-vision-camera": "2.14.1", if you have '^' this sign with versions remove it first yarn / npm i

Nice! this worked for me. I didn't have to delete node_modules or do a ./gradlew clean either. Simply downgrading react-native-reanimated to 2.10.0 worked fine.

@mrousavy
Copy link
Owner

Hey! I've rewritten the entire Android codebase of VisionCamera from CameraX to Camera2 in the efforts of ✨ VisionCamera V3.

I just now completed the Camera2 rewrite and I believe the core structure is running, but there might be some edge cases to iron out. Can you try and test the PR #1674 for me to see if you can still reproduce this issue here?

Here's an instruction on how you can test that: #1674 (comment)

If the issue cannot be reproduced with that version/PR anymore, then hoorayy, I fixed it! 🎉
Otherwise please let me know and I'll keep this issue open to keep track of it.

Thank you!

@manish0707
Copy link

Getting the following error. I just installed "react-native-vision-camera": "3.2.2" and ran run-android command,

`

Task :react-native-vision-camera:buildCMakeDebug[arm64-v8a] FAILED
C/C++: ninja: Entering directory /Users/manishsharma/Desktop/project/node_modules/react-native-vision-camera/android/.cxx/Debug/5v4y3g45/arm64-v8a' C/C++: /Users/manishsharma/Desktop//node_modules/react-native-vision-camera/android/src/main/cpp/frameprocessor/java-bindings/JFrame.cpp:65:10: error: 'AHardwareBuffer_fromHardwareBuffer' is unavailable: introduced in Android 26

`What went wrong:
Execution failed for task ':react-native-vision-camera:buildCMakeDebug[arm64-v8a]'.

com.android.ide.common.process.ProcessException: ninja: Entering directory /Users/manishsharma/Desktop/project1/node_modules/react-native-vision-camera/android/.cxx/Debug/5v4y3g45/arm64-v8a' [1/16] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/OpenGLRenderer.cpp.o [2/16] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/PassThroughShader.cpp.o [3/16] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessor/java-bindings/JFrameProcessor.cpp.o [4/16] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/OpenGLContext.cpp.o [5/16] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessor/java-bindings/JFrame.cpp.o FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessor/java-bindings/JFrame.cpp.o /Users/manishsharma/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --sysroot=/Users/manishsharma/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DVISION_CAMERA_ENABLE_FRAME_PROCESSORS=false -DVisionCamera_EXPORTS -I/Users/manishsharma/Desktop/project1/node_modules/react-native-vision-camera/android/../cpp -I/Users/manishsharma/Desktop/project1/node_modules/react-native-vision-camera/android/src/main/cpp -I/Users/manishsharma/Desktop/project1/node_modules/react-native-vision-camera/android/src/main/cpp/frameprocessor -I/Users/manishsharma/Desktop/project1/node_modules/react-native-vision-camera/android/src/main/cpp/frameprocessor/java-bindings -I/Users/manishsharma/Desktop/project1/node_modules/react-native/ReactCommon -I/Users/manishsharma/Desktop/project1/node_modules/react-native/ReactCommon/callinvoker -I/Users/manishsharma/Desktop/project1/node_modules/react-native/ReactAndroid/src/main/jni/react/turbomodule -isystem /Users/manishsharma/.gradle/caches/transforms-3/6fe00d6361b0f0c55549aec89a7f6742/transformed/jetified-react-android-0.72.4-debug/prefab/modules/jsi/include -isystem /Users/manishsharma/.gradle/caches/transforms-3/6fe00d6361b0f0c55549aec89a7f6742/transformed/jetified-react-android-0.72.4-debug/prefab/modules/reactnativejni/include -isystem /Users/manishsharma/.gradle/caches/transforms-3/34c2120d0d3cd8dc97826fc02c9e8fc4/transformed/jetified-fbjni-0.3.0/prefab/modules/fbjni/include -O2 -frtti -fexceptions -Wall -Wno-unused-variable -fstack-protector-all -g -fno-limit-debug-info -fPIC -std=gnu++17 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessor/java-bindings/JFrame.cpp.o -MF CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessor/java-bindings/JFrame.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessor/java-bindings/JFrame.cpp.o -c /Users/manishsharma/Desktop/project1/node_modules/react-native-vision-camera/android/src/main/cpp/frameprocessor/java-bindings/JFrame.cpp /Users/manishsharma/Desktop/project1/node_modules/react-native-vision-camera/android/src/main/cpp/frameprocessor/java-bindings/JFrame.cpp:65:10: error: 'AHardwareBuffer_fromHardwareBuffer' is unavailable: introduced in Android 26 return AHardwareBuffer_fromHardwareBuffer(jni::Environment::current(), hardwareBuffer.get()); ^ /Users/manishsharma/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/android/hardware_buffer_jni.h:48:18: note: 'AHardwareBuffer_fromHardwareBuffer' has been explicitly marked unavailable here AHardwareBuffer* AHardwareBuffer_fromHardwareBuffer(JNIEnv* env, ^ 1 error generated. [6/16] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessor/FrameHostObject.cpp.o FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessor/FrameHostObject.cpp.o

Versions I am using:

  • "react": "18.2.0"
  • "react-native": "0.72.4"
  • "react-native-vision-camera": "3.2.2"

Environment

  • Macbook M1 chip

Please help me out here.

@mrousavy
Copy link
Owner

mrousavy commented Oct 2, 2023

see #1898

@NathanielNLA
Copy link

I fixed it by following the below steps :)

- watchman watch-del-all

- yarn cache clean --force
- 
npm cache clean --force # optional - in case you have used npm
- 
rm -rf node_modules/
rm yarn.lock
- 
rm package-lock.json # optional - in case you have used npm

- rm -rf $TMPDIR/metro-*

- rm -rf $TMPDIR/haste-*
- 
yarn install / npm install
- 
yarn start --reset-cache
- cd ios && rm -rf Podfile.lock && rm -rf Pods/ && pod install --verbose

Was skeptical at first, but this worked for me as well

@FaterYU
Copy link

FaterYU commented Dec 13, 2023

It works for me by removing and adding it again:

yarn remove react-native-vision-camera
yarn cache clean --force
yarn add react-native-vision-camera
yarn start

@Buwaneka-Sumanasekara
Copy link

I had to do


softwareupdate --install-rosetta

on a mac M1 to fix this issue.

We realized the cmake command was returning an error stating "bad CPU"

Try:


~/Library/Android/sdk/cmake/3.18.1/bin/cmake --version

Make sure your command with cmake and the corresponding version does not throw an error.

Thanks to @edwinw6 !

This solution works for me as well. Thanks mate! ✌️

@Tanererkan06
Copy link

yarn remove react-native-vision-camera

could be share package.json ?

austinbh1003 pushed a commit to austinbh1003/vision-camera that referenced this issue Jul 11, 2024
See mrousavy/react-native-vision-camera#1376

## Breaking Changes

* Frame Processors are now **synchronous**. Previously they ran on a
separate Thread. If you want to run something on a separate Thread now,
use `runAsync` inside a Frame Processor
* Frame Processor Plugins are no longer in the global object with the
`__` prefix, but rather stored directly in the `FrameProcessorPlugins`
object exported by react-native-vision-camera. (e.g. replace
`__scanQRCodes(frame)` with `FrameProcessorPlugins.scanQRCodes(frame)`)
* `frameProcessorFps` no longer exists. Use `runAtTargetFps` inside a
Frame Processor to throttle some calls.
* `onFrameProcessorPerformanceSuggestionAvailable` no longer exists. Use
the FPS display (`enableFpsGraph={true}`) to see how your Frame
Processor performs over time. This is more in-line with how React Native
works (Dev Tools / Perf Monitor)
* VisionCamera V3 will not work on RN 0.70 or below. You need to use RN
0.71. This is because the build script got way simpler and smaller,
making it faster to build and way less error prone. Backwards
compatibility is just too complex here.
* Reanimated is no longer used as a Worklet Runtime. Instead,
VisionCamera now uses
[react-native-worklets-core](https://github.com/margelo/react-native-worklets-core).

## Progress

You can test the latest V3 release by creating a new RN project with RN
0.71 and installing VisionCamera + RNWorklets:

```sh
yarn add react-native-vision-camera@3.0.0-rc.5
yarn add react-native-worklets-core
yarn add @shopify/react-native-skia
```

Things to test:

* TensorFlow Lite plugin to load any `.tflite` model!! ✨ (see [this PR
for more
info](mrousavy/react-native-vision-camera#1633),
will be a separate library soon)
* Drawing onto a Frame using Skia!! 🎉 
* Using `frame.toArrayBuffer()` to get the Frame's byte content in JS
* New Android build script. This should drastically speed up the build
time! 💨
* New Worklet library. This replaces Reanimated Worklets. Should be
faster and more stable :)
* New synchronous Frame Processors. Should be faster :)
* `runAtTargetFps` and `runAsync` in Frame Processors
* Using HostObjects or HostFunctions (like models from PyTorch) inside a
Frame Processor. This will probably require a few native bindings on
PyTorch's end to make the integration work (cc @raedle)

Overall V3 is close to completion. I have a few things to do the coming
days so not sure how much work I can put into this. **If anyone wants to
support the development of v3, I'd appreciate donations / sponsors:
https://github.com/sponsors/mrousavy** ❤️ :)


## Related issues 

features

- resolves
mrousavy/react-native-vision-camera#1376
- fixes
mrousavy/react-native-vision-camera#281
- resolves
mrousavy/react-native-vision-camera#211
- resolves
mrousavy/react-native-vision-camera#130
- resolves
mrousavy/react-native-vision-camera#117
- fixes mrousavy/react-native-vision-camera#76
- resolves
mrousavy/react-native-vision-camera#75
- resolves
mrousavy/react-native-vision-camera#562
- resolves
mrousavy/react-native-vision-camera#565
- fixes
mrousavy/react-native-vision-camera#570
- fixes
mrousavy/react-native-vision-camera#287
- resolves
mrousavy/react-native-vision-camera#311
- fixes
mrousavy/react-native-vision-camera#315
- resolves
mrousavy/react-native-vision-camera#323
- fixes
mrousavy/react-native-vision-camera#340
- fixes
mrousavy/react-native-vision-camera#354
- resolves
mrousavy/react-native-vision-camera#420
- fixes
mrousavy/react-native-vision-camera#434
- fixes
mrousavy/react-native-vision-camera#452
- fixes
mrousavy/react-native-vision-camera#496
- fixes
mrousavy/react-native-vision-camera#497
- resolves
mrousavy/react-native-vision-camera#499
- fixes
mrousavy/react-native-vision-camera#516
- fixes
mrousavy/react-native-vision-camera#527
- fixes
mrousavy/react-native-vision-camera#542
- fixes
mrousavy/react-native-vision-camera#548
- fixes
mrousavy/react-native-vision-camera#561
- fixes
mrousavy/react-native-vision-camera#740
- fixes
mrousavy/react-native-vision-camera#770


...and then pretty much every Android issue lol

- fixes
mrousavy/react-native-vision-camera#1675
(**maybe**, please test @PrernaBudhraja)
- fixes
mrousavy/react-native-vision-camera#1671

.. maybe also (not tested):

- fixes
mrousavy/react-native-vision-camera#1698
- fixes
mrousavy/react-native-vision-camera#1687
- fixes
mrousavy/react-native-vision-camera#1685
- fixes
mrousavy/react-native-vision-camera#1681
- fixes
mrousavy/react-native-vision-camera#1650
- fixes
mrousavy/react-native-vision-camera#1646
- fixes
mrousavy/react-native-vision-camera#1635
- fixes
mrousavy/react-native-vision-camera#1631
- fixes
mrousavy/react-native-vision-camera#1621
- fixes
mrousavy/react-native-vision-camera#1615
- fixes
mrousavy/react-native-vision-camera#1612
- fixes
mrousavy/react-native-vision-camera#1605
- fixes
mrousavy/react-native-vision-camera#1599
- fixes
mrousavy/react-native-vision-camera#1585
- fixes
mrousavy/react-native-vision-camera#1581
- fixes
mrousavy/react-native-vision-camera#1569
- fixes
mrousavy/react-native-vision-camera#1568
- fixes
mrousavy/react-native-vision-camera#1565
- fixes
mrousavy/react-native-vision-camera#1561
- fixes
mrousavy/react-native-vision-camera#1558
- fixes
mrousavy/react-native-vision-camera#1554
- fixes
mrousavy/react-native-vision-camera#1551
- fixes
mrousavy/react-native-vision-camera#1547
- fixes
mrousavy/react-native-vision-camera#1543
- fixes
mrousavy/react-native-vision-camera#1538
- fixes
mrousavy/react-native-vision-camera#1536
- fixes
mrousavy/react-native-vision-camera#1534
- fixes
mrousavy/react-native-vision-camera#1528
- fixes
mrousavy/react-native-vision-camera#1520
- fixes
mrousavy/react-native-vision-camera#1498
- fixes
mrousavy/react-native-vision-camera#1489
- fixes
mrousavy/react-native-vision-camera#1477
- fixes
mrousavy/react-native-vision-camera#1474
- fixes
mrousavy/react-native-vision-camera#1463
- fixes
mrousavy/react-native-vision-camera#1462
- fixes
mrousavy/react-native-vision-camera#1449
- fixes
mrousavy/react-native-vision-camera#1443
- fixes
mrousavy/react-native-vision-camera#1437
- fixes
mrousavy/react-native-vision-camera#1431
- fixes
mrousavy/react-native-vision-camera#1429
- fixes
mrousavy/react-native-vision-camera#1427
- fixes
mrousavy/react-native-vision-camera#1423
- fixes
mrousavy/react-native-vision-camera#1416
- fixes
mrousavy/react-native-vision-camera#1407
- fixes
mrousavy/react-native-vision-camera#1403
- fixes
mrousavy/react-native-vision-camera#1402
- fixes
mrousavy/react-native-vision-camera#1398
- fixes
mrousavy/react-native-vision-camera#1396
- fixes
mrousavy/react-native-vision-camera#1395
- fixes
mrousavy/react-native-vision-camera#1379
- fixes
mrousavy/react-native-vision-camera#1377
- fixes
mrousavy/react-native-vision-camera#1374
- fixes
mrousavy/react-native-vision-camera#1373
- fixes
mrousavy/react-native-vision-camera#1365
- fixes
mrousavy/react-native-vision-camera#1356
- fixes
mrousavy/react-native-vision-camera#1353
- fixes
mrousavy/react-native-vision-camera#1352
- fixes
mrousavy/react-native-vision-camera#1351
- fixes
mrousavy/react-native-vision-camera#1343
- fixes
mrousavy/react-native-vision-camera#1340
- fixes
mrousavy/react-native-vision-camera#1334
- fixes
mrousavy/react-native-vision-camera#1330
- fixes
mrousavy/react-native-vision-camera#1322
- fixes
mrousavy/react-native-vision-camera#1296
- fixes
mrousavy/react-native-vision-camera#1283
- fixes
mrousavy/react-native-vision-camera#1260
- fixes
mrousavy/react-native-vision-camera#1253
- fixes
mrousavy/react-native-vision-camera#1251
- fixes
mrousavy/react-native-vision-camera#1245
- fixes
mrousavy/react-native-vision-camera#1238
- fixes
mrousavy/react-native-vision-camera#1227
- fixes
mrousavy/react-native-vision-camera#1226
- fixes
mrousavy/react-native-vision-camera#1225
- fixes
mrousavy/react-native-vision-camera#1222
- fixes
mrousavy/react-native-vision-camera#1211
- fixes
mrousavy/react-native-vision-camera#1208
- fixes
mrousavy/react-native-vision-camera#1193
- fixes
mrousavy/react-native-vision-camera#1191
- fixes
mrousavy/react-native-vision-camera#1184
- fixes
mrousavy/react-native-vision-camera#1164
- fixes
mrousavy/react-native-vision-camera#1143
- fixes
mrousavy/react-native-vision-camera#1128
- fixes
mrousavy/react-native-vision-camera#1122
- fixes
mrousavy/react-native-vision-camera#1120
- fixes
mrousavy/react-native-vision-camera#1110
- fixes
mrousavy/react-native-vision-camera#1097
- fixes
mrousavy/react-native-vision-camera#1081
- fixes
mrousavy/react-native-vision-camera#1080
- fixes
mrousavy/react-native-vision-camera#1064
- fixes
mrousavy/react-native-vision-camera#1053
- fixes
mrousavy/react-native-vision-camera#1047
- fixes
mrousavy/react-native-vision-camera#1044
- fixes
mrousavy/react-native-vision-camera#1032
- fixes
mrousavy/react-native-vision-camera#1026
- fixes
mrousavy/react-native-vision-camera#1023
- fixes
mrousavy/react-native-vision-camera#1015
- fixes
mrousavy/react-native-vision-camera#1012
- fixes
mrousavy/react-native-vision-camera#997
- fixes
mrousavy/react-native-vision-camera#960
- fixes
mrousavy/react-native-vision-camera#959
- fixes
mrousavy/react-native-vision-camera#954
- fixes
mrousavy/react-native-vision-camera#946
- fixes
mrousavy/react-native-vision-camera#945
- fixes
mrousavy/react-native-vision-camera#922
- fixes
mrousavy/react-native-vision-camera#908
- fixes
mrousavy/react-native-vision-camera#907
- fixes
mrousavy/react-native-vision-camera#868
- fixes
mrousavy/react-native-vision-camera#855
- fixes
mrousavy/react-native-vision-camera#834
- fixes
mrousavy/react-native-vision-camera#793
- fixes
mrousavy/react-native-vision-camera#779
- fixes
mrousavy/react-native-vision-camera#746
- fixes
mrousavy/react-native-vision-camera#740
- fixes
mrousavy/react-native-vision-camera#727
- fixes
mrousavy/react-native-vision-camera#671
- fixes
mrousavy/react-native-vision-camera#613
- fixes
mrousavy/react-native-vision-camera#595
- fixes
mrousavy/react-native-vision-camera#588
- fixes
mrousavy/react-native-vision-camera#570
- fixes
mrousavy/react-native-vision-camera#569
- fixes
mrousavy/react-native-vision-camera#542
- fixes
mrousavy/react-native-vision-camera#516
- fixes
mrousavy/react-native-vision-camera#515
- fixes
mrousavy/react-native-vision-camera#434
- fixes
mrousavy/react-native-vision-camera#354
- fixes
mrousavy/react-native-vision-camera#323
- fixes
mrousavy/react-native-vision-camera#315
- fixes
mrousavy/react-native-vision-camera#281
- fixes
mrousavy/react-native-vision-camera#211
- fixes mrousavy/react-native-vision-camera#76
@Thanhluc98
Copy link

I had to do

softwareupdate --install-rosetta

on a mac M1 to fix this issue.

We realized the cmake command was returning an error stating "bad CPU" Try:

~/Library/Android/sdk/cmake/3.18.1/bin/cmake --version

Make sure your command with cmake and the corresponding version does not throw an error.

Thanks to @edwinw6 !

This work for me.

@shahvaiz7
Copy link

this is worked for me

npm remove react-native-vision-camera
npm cache clean --force
npm add react-native-vision-camera
npx react-native run-android

max71126 added a commit to max71126/react-native-vision-camera that referenced this issue Sep 19, 2024
See mrousavy/react-native-vision-camera#1376

## Breaking Changes

* Frame Processors are now **synchronous**. Previously they ran on a
separate Thread. If you want to run something on a separate Thread now,
use `runAsync` inside a Frame Processor
* Frame Processor Plugins are no longer in the global object with the
`__` prefix, but rather stored directly in the `FrameProcessorPlugins`
object exported by react-native-vision-camera. (e.g. replace
`__scanQRCodes(frame)` with `FrameProcessorPlugins.scanQRCodes(frame)`)
* `frameProcessorFps` no longer exists. Use `runAtTargetFps` inside a
Frame Processor to throttle some calls.
* `onFrameProcessorPerformanceSuggestionAvailable` no longer exists. Use
the FPS display (`enableFpsGraph={true}`) to see how your Frame
Processor performs over time. This is more in-line with how React Native
works (Dev Tools / Perf Monitor)
* VisionCamera V3 will not work on RN 0.70 or below. You need to use RN
0.71. This is because the build script got way simpler and smaller,
making it faster to build and way less error prone. Backwards
compatibility is just too complex here.
* Reanimated is no longer used as a Worklet Runtime. Instead,
VisionCamera now uses
[react-native-worklets-core](https://github.com/margelo/react-native-worklets-core).

## Progress

You can test the latest V3 release by creating a new RN project with RN
0.71 and installing VisionCamera + RNWorklets:

```sh
yarn add react-native-vision-camera@3.0.0-rc.5
yarn add react-native-worklets-core
yarn add @shopify/react-native-skia
```

Things to test:

* TensorFlow Lite plugin to load any `.tflite` model!! ✨ (see [this PR
for more
info](mrousavy/react-native-vision-camera#1633),
will be a separate library soon)
* Drawing onto a Frame using Skia!! 🎉 
* Using `frame.toArrayBuffer()` to get the Frame's byte content in JS
* New Android build script. This should drastically speed up the build
time! 💨
* New Worklet library. This replaces Reanimated Worklets. Should be
faster and more stable :)
* New synchronous Frame Processors. Should be faster :)
* `runAtTargetFps` and `runAsync` in Frame Processors
* Using HostObjects or HostFunctions (like models from PyTorch) inside a
Frame Processor. This will probably require a few native bindings on
PyTorch's end to make the integration work (cc @raedle)

Overall V3 is close to completion. I have a few things to do the coming
days so not sure how much work I can put into this. **If anyone wants to
support the development of v3, I'd appreciate donations / sponsors:
https://github.com/sponsors/mrousavy** ❤️ :)


## Related issues 

features

- resolves
mrousavy/react-native-vision-camera#1376
- fixes
mrousavy/react-native-vision-camera#281
- resolves
mrousavy/react-native-vision-camera#211
- resolves
mrousavy/react-native-vision-camera#130
- resolves
mrousavy/react-native-vision-camera#117
- fixes mrousavy/react-native-vision-camera#76
- resolves
mrousavy/react-native-vision-camera#75
- resolves
mrousavy/react-native-vision-camera#562
- resolves
mrousavy/react-native-vision-camera#565
- fixes
mrousavy/react-native-vision-camera#570
- fixes
mrousavy/react-native-vision-camera#287
- resolves
mrousavy/react-native-vision-camera#311
- fixes
mrousavy/react-native-vision-camera#315
- resolves
mrousavy/react-native-vision-camera#323
- fixes
mrousavy/react-native-vision-camera#340
- fixes
mrousavy/react-native-vision-camera#354
- resolves
mrousavy/react-native-vision-camera#420
- fixes
mrousavy/react-native-vision-camera#434
- fixes
mrousavy/react-native-vision-camera#452
- fixes
mrousavy/react-native-vision-camera#496
- fixes
mrousavy/react-native-vision-camera#497
- resolves
mrousavy/react-native-vision-camera#499
- fixes
mrousavy/react-native-vision-camera#516
- fixes
mrousavy/react-native-vision-camera#527
- fixes
mrousavy/react-native-vision-camera#542
- fixes
mrousavy/react-native-vision-camera#548
- fixes
mrousavy/react-native-vision-camera#561
- fixes
mrousavy/react-native-vision-camera#740
- fixes
mrousavy/react-native-vision-camera#770


...and then pretty much every Android issue lol

- fixes
mrousavy/react-native-vision-camera#1675
(**maybe**, please test @PrernaBudhraja)
- fixes
mrousavy/react-native-vision-camera#1671

.. maybe also (not tested):

- fixes
mrousavy/react-native-vision-camera#1698
- fixes
mrousavy/react-native-vision-camera#1687
- fixes
mrousavy/react-native-vision-camera#1685
- fixes
mrousavy/react-native-vision-camera#1681
- fixes
mrousavy/react-native-vision-camera#1650
- fixes
mrousavy/react-native-vision-camera#1646
- fixes
mrousavy/react-native-vision-camera#1635
- fixes
mrousavy/react-native-vision-camera#1631
- fixes
mrousavy/react-native-vision-camera#1621
- fixes
mrousavy/react-native-vision-camera#1615
- fixes
mrousavy/react-native-vision-camera#1612
- fixes
mrousavy/react-native-vision-camera#1605
- fixes
mrousavy/react-native-vision-camera#1599
- fixes
mrousavy/react-native-vision-camera#1585
- fixes
mrousavy/react-native-vision-camera#1581
- fixes
mrousavy/react-native-vision-camera#1569
- fixes
mrousavy/react-native-vision-camera#1568
- fixes
mrousavy/react-native-vision-camera#1565
- fixes
mrousavy/react-native-vision-camera#1561
- fixes
mrousavy/react-native-vision-camera#1558
- fixes
mrousavy/react-native-vision-camera#1554
- fixes
mrousavy/react-native-vision-camera#1551
- fixes
mrousavy/react-native-vision-camera#1547
- fixes
mrousavy/react-native-vision-camera#1543
- fixes
mrousavy/react-native-vision-camera#1538
- fixes
mrousavy/react-native-vision-camera#1536
- fixes
mrousavy/react-native-vision-camera#1534
- fixes
mrousavy/react-native-vision-camera#1528
- fixes
mrousavy/react-native-vision-camera#1520
- fixes
mrousavy/react-native-vision-camera#1498
- fixes
mrousavy/react-native-vision-camera#1489
- fixes
mrousavy/react-native-vision-camera#1477
- fixes
mrousavy/react-native-vision-camera#1474
- fixes
mrousavy/react-native-vision-camera#1463
- fixes
mrousavy/react-native-vision-camera#1462
- fixes
mrousavy/react-native-vision-camera#1449
- fixes
mrousavy/react-native-vision-camera#1443
- fixes
mrousavy/react-native-vision-camera#1437
- fixes
mrousavy/react-native-vision-camera#1431
- fixes
mrousavy/react-native-vision-camera#1429
- fixes
mrousavy/react-native-vision-camera#1427
- fixes
mrousavy/react-native-vision-camera#1423
- fixes
mrousavy/react-native-vision-camera#1416
- fixes
mrousavy/react-native-vision-camera#1407
- fixes
mrousavy/react-native-vision-camera#1403
- fixes
mrousavy/react-native-vision-camera#1402
- fixes
mrousavy/react-native-vision-camera#1398
- fixes
mrousavy/react-native-vision-camera#1396
- fixes
mrousavy/react-native-vision-camera#1395
- fixes
mrousavy/react-native-vision-camera#1379
- fixes
mrousavy/react-native-vision-camera#1377
- fixes
mrousavy/react-native-vision-camera#1374
- fixes
mrousavy/react-native-vision-camera#1373
- fixes
mrousavy/react-native-vision-camera#1365
- fixes
mrousavy/react-native-vision-camera#1356
- fixes
mrousavy/react-native-vision-camera#1353
- fixes
mrousavy/react-native-vision-camera#1352
- fixes
mrousavy/react-native-vision-camera#1351
- fixes
mrousavy/react-native-vision-camera#1343
- fixes
mrousavy/react-native-vision-camera#1340
- fixes
mrousavy/react-native-vision-camera#1334
- fixes
mrousavy/react-native-vision-camera#1330
- fixes
mrousavy/react-native-vision-camera#1322
- fixes
mrousavy/react-native-vision-camera#1296
- fixes
mrousavy/react-native-vision-camera#1283
- fixes
mrousavy/react-native-vision-camera#1260
- fixes
mrousavy/react-native-vision-camera#1253
- fixes
mrousavy/react-native-vision-camera#1251
- fixes
mrousavy/react-native-vision-camera#1245
- fixes
mrousavy/react-native-vision-camera#1238
- fixes
mrousavy/react-native-vision-camera#1227
- fixes
mrousavy/react-native-vision-camera#1226
- fixes
mrousavy/react-native-vision-camera#1225
- fixes
mrousavy/react-native-vision-camera#1222
- fixes
mrousavy/react-native-vision-camera#1211
- fixes
mrousavy/react-native-vision-camera#1208
- fixes
mrousavy/react-native-vision-camera#1193
- fixes
mrousavy/react-native-vision-camera#1191
- fixes
mrousavy/react-native-vision-camera#1184
- fixes
mrousavy/react-native-vision-camera#1164
- fixes
mrousavy/react-native-vision-camera#1143
- fixes
mrousavy/react-native-vision-camera#1128
- fixes
mrousavy/react-native-vision-camera#1122
- fixes
mrousavy/react-native-vision-camera#1120
- fixes
mrousavy/react-native-vision-camera#1110
- fixes
mrousavy/react-native-vision-camera#1097
- fixes
mrousavy/react-native-vision-camera#1081
- fixes
mrousavy/react-native-vision-camera#1080
- fixes
mrousavy/react-native-vision-camera#1064
- fixes
mrousavy/react-native-vision-camera#1053
- fixes
mrousavy/react-native-vision-camera#1047
- fixes
mrousavy/react-native-vision-camera#1044
- fixes
mrousavy/react-native-vision-camera#1032
- fixes
mrousavy/react-native-vision-camera#1026
- fixes
mrousavy/react-native-vision-camera#1023
- fixes
mrousavy/react-native-vision-camera#1015
- fixes
mrousavy/react-native-vision-camera#1012
- fixes
mrousavy/react-native-vision-camera#997
- fixes
mrousavy/react-native-vision-camera#960
- fixes
mrousavy/react-native-vision-camera#959
- fixes
mrousavy/react-native-vision-camera#954
- fixes
mrousavy/react-native-vision-camera#946
- fixes
mrousavy/react-native-vision-camera#945
- fixes
mrousavy/react-native-vision-camera#922
- fixes
mrousavy/react-native-vision-camera#908
- fixes
mrousavy/react-native-vision-camera#907
- fixes
mrousavy/react-native-vision-camera#868
- fixes
mrousavy/react-native-vision-camera#855
- fixes
mrousavy/react-native-vision-camera#834
- fixes
mrousavy/react-native-vision-camera#793
- fixes
mrousavy/react-native-vision-camera#779
- fixes
mrousavy/react-native-vision-camera#746
- fixes
mrousavy/react-native-vision-camera#740
- fixes
mrousavy/react-native-vision-camera#727
- fixes
mrousavy/react-native-vision-camera#671
- fixes
mrousavy/react-native-vision-camera#613
- fixes
mrousavy/react-native-vision-camera#595
- fixes
mrousavy/react-native-vision-camera#588
- fixes
mrousavy/react-native-vision-camera#570
- fixes
mrousavy/react-native-vision-camera#569
- fixes
mrousavy/react-native-vision-camera#542
- fixes
mrousavy/react-native-vision-camera#516
- fixes
mrousavy/react-native-vision-camera#515
- fixes
mrousavy/react-native-vision-camera#434
- fixes
mrousavy/react-native-vision-camera#354
- fixes
mrousavy/react-native-vision-camera#323
- fixes
mrousavy/react-native-vision-camera#315
- fixes
mrousavy/react-native-vision-camera#281
- fixes
mrousavy/react-native-vision-camera#211
- fixes mrousavy/react-native-vision-camera#76
isaaccolson pushed a commit to isaaccolson/deliveries-mobile that referenced this issue Oct 30, 2024
See mrousavy#1376

## Breaking Changes

* Frame Processors are now **synchronous**. Previously they ran on a
separate Thread. If you want to run something on a separate Thread now,
use `runAsync` inside a Frame Processor
* Frame Processor Plugins are no longer in the global object with the
`__` prefix, but rather stored directly in the `FrameProcessorPlugins`
object exported by react-native-vision-camera. (e.g. replace
`__scanQRCodes(frame)` with `FrameProcessorPlugins.scanQRCodes(frame)`)
* `frameProcessorFps` no longer exists. Use `runAtTargetFps` inside a
Frame Processor to throttle some calls.
* `onFrameProcessorPerformanceSuggestionAvailable` no longer exists. Use
the FPS display (`enableFpsGraph={true}`) to see how your Frame
Processor performs over time. This is more in-line with how React Native
works (Dev Tools / Perf Monitor)
* VisionCamera V3 will not work on RN 0.70 or below. You need to use RN
0.71. This is because the build script got way simpler and smaller,
making it faster to build and way less error prone. Backwards
compatibility is just too complex here.
* Reanimated is no longer used as a Worklet Runtime. Instead,
VisionCamera now uses
[react-native-worklets-core](https://github.com/margelo/react-native-worklets-core).

## Progress

You can test the latest V3 release by creating a new RN project with RN
0.71 and installing VisionCamera + RNWorklets:

```sh
yarn add react-native-vision-camera@3.0.0-rc.5
yarn add react-native-worklets-core
yarn add @shopify/react-native-skia
```

Things to test:

* TensorFlow Lite plugin to load any `.tflite` model!! ✨ (see [this PR
for more
info](mrousavy#1633),
will be a separate library soon)
* Drawing onto a Frame using Skia!! 🎉 
* Using `frame.toArrayBuffer()` to get the Frame's byte content in JS
* New Android build script. This should drastically speed up the build
time! 💨
* New Worklet library. This replaces Reanimated Worklets. Should be
faster and more stable :)
* New synchronous Frame Processors. Should be faster :)
* `runAtTargetFps` and `runAsync` in Frame Processors
* Using HostObjects or HostFunctions (like models from PyTorch) inside a
Frame Processor. This will probably require a few native bindings on
PyTorch's end to make the integration work (cc @raedle)

Overall V3 is close to completion. I have a few things to do the coming
days so not sure how much work I can put into this. **If anyone wants to
support the development of v3, I'd appreciate donations / sponsors:
https://github.com/sponsors/mrousavy** ❤️ :)


## Related issues 

features

- resolves
mrousavy#1376
- fixes
mrousavy#281
- resolves
mrousavy#211
- resolves
mrousavy#130
- resolves
mrousavy#117
- fixes mrousavy#76
- resolves
mrousavy#75
- resolves
mrousavy#562
- resolves
mrousavy#565
- fixes
mrousavy#570
- fixes
mrousavy#287
- resolves
mrousavy#311
- fixes
mrousavy#315
- resolves
mrousavy#323
- fixes
mrousavy#340
- fixes
mrousavy#354
- resolves
mrousavy#420
- fixes
mrousavy#434
- fixes
mrousavy#452
- fixes
mrousavy#496
- fixes
mrousavy#497
- resolves
mrousavy#499
- fixes
mrousavy#516
- fixes
mrousavy#527
- fixes
mrousavy#542
- fixes
mrousavy#548
- fixes
mrousavy#561
- fixes
mrousavy#740
- fixes
mrousavy#770


...and then pretty much every Android issue lol

- fixes
mrousavy#1675
(**maybe**, please test @PrernaBudhraja)
- fixes
mrousavy#1671

.. maybe also (not tested):

- fixes
mrousavy#1698
- fixes
mrousavy#1687
- fixes
mrousavy#1685
- fixes
mrousavy#1681
- fixes
mrousavy#1650
- fixes
mrousavy#1646
- fixes
mrousavy#1635
- fixes
mrousavy#1631
- fixes
mrousavy#1621
- fixes
mrousavy#1615
- fixes
mrousavy#1612
- fixes
mrousavy#1605
- fixes
mrousavy#1599
- fixes
mrousavy#1585
- fixes
mrousavy#1581
- fixes
mrousavy#1569
- fixes
mrousavy#1568
- fixes
mrousavy#1565
- fixes
mrousavy#1561
- fixes
mrousavy#1558
- fixes
mrousavy#1554
- fixes
mrousavy#1551
- fixes
mrousavy#1547
- fixes
mrousavy#1543
- fixes
mrousavy#1538
- fixes
mrousavy#1536
- fixes
mrousavy#1534
- fixes
mrousavy#1528
- fixes
mrousavy#1520
- fixes
mrousavy#1498
- fixes
mrousavy#1489
- fixes
mrousavy#1477
- fixes
mrousavy#1474
- fixes
mrousavy#1463
- fixes
mrousavy#1462
- fixes
mrousavy#1449
- fixes
mrousavy#1443
- fixes
mrousavy#1437
- fixes
mrousavy#1431
- fixes
mrousavy#1429
- fixes
mrousavy#1427
- fixes
mrousavy#1423
- fixes
mrousavy#1416
- fixes
mrousavy#1407
- fixes
mrousavy#1403
- fixes
mrousavy#1402
- fixes
mrousavy#1398
- fixes
mrousavy#1396
- fixes
mrousavy#1395
- fixes
mrousavy#1379
- fixes
mrousavy#1377
- fixes
mrousavy#1374
- fixes
mrousavy#1373
- fixes
mrousavy#1365
- fixes
mrousavy#1356
- fixes
mrousavy#1353
- fixes
mrousavy#1352
- fixes
mrousavy#1351
- fixes
mrousavy#1343
- fixes
mrousavy#1340
- fixes
mrousavy#1334
- fixes
mrousavy#1330
- fixes
mrousavy#1322
- fixes
mrousavy#1296
- fixes
mrousavy#1283
- fixes
mrousavy#1260
- fixes
mrousavy#1253
- fixes
mrousavy#1251
- fixes
mrousavy#1245
- fixes
mrousavy#1238
- fixes
mrousavy#1227
- fixes
mrousavy#1226
- fixes
mrousavy#1225
- fixes
mrousavy#1222
- fixes
mrousavy#1211
- fixes
mrousavy#1208
- fixes
mrousavy#1193
- fixes
mrousavy#1191
- fixes
mrousavy#1184
- fixes
mrousavy#1164
- fixes
mrousavy#1143
- fixes
mrousavy#1128
- fixes
mrousavy#1122
- fixes
mrousavy#1120
- fixes
mrousavy#1110
- fixes
mrousavy#1097
- fixes
mrousavy#1081
- fixes
mrousavy#1080
- fixes
mrousavy#1064
- fixes
mrousavy#1053
- fixes
mrousavy#1047
- fixes
mrousavy#1044
- fixes
mrousavy#1032
- fixes
mrousavy#1026
- fixes
mrousavy#1023
- fixes
mrousavy#1015
- fixes
mrousavy#1012
- fixes
mrousavy#997
- fixes
mrousavy#960
- fixes
mrousavy#959
- fixes
mrousavy#954
- fixes
mrousavy#946
- fixes
mrousavy#945
- fixes
mrousavy#922
- fixes
mrousavy#908
- fixes
mrousavy#907
- fixes
mrousavy#868
- fixes
mrousavy#855
- fixes
mrousavy#834
- fixes
mrousavy#793
- fixes
mrousavy#779
- fixes
mrousavy#746
- fixes
mrousavy#740
- fixes
mrousavy#727
- fixes
mrousavy#671
- fixes
mrousavy#613
- fixes
mrousavy#595
- fixes
mrousavy#588
- fixes
mrousavy#570
- fixes
mrousavy#569
- fixes
mrousavy#542
- fixes
mrousavy#516
- fixes
mrousavy#515
- fixes
mrousavy#434
- fixes
mrousavy#354
- fixes
mrousavy#323
- fixes
mrousavy#315
- fixes
mrousavy#281
- fixes
mrousavy#211
- fixes mrousavy#76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.