Closed jslok closed 10 months ago
this also happens to me quite often, it builds after deleting android/.gradle
folder
having same issue when running the command cd android && ./gradlew clean && cd - && npx react-native run-android
deleting android/.gradle folder before building helped fix this for me.
deleting android/.gradle folder before building helped fix this for me.
this should be the correct answer, just test it, when build error occurs, clean project does not work, we need to delete the whole cache folder
deleting android/.gradle folder before building helped fix this for me.
Life savior.
getting this error here
C/C++: CMake Generate step failed. Build files cannot be regenerated correctly. [CXX1429] error when building with cmake using C:\Users\divit\Nutrify\nutodaymobileapp\node_modules\react-native-vision-camera\android\CMakeLists.txt: -- Android: Targeting API '26' with architecture 'x86', ABI 'x86', and processor 'i686' -- Android: Selected unified Clang toolchain -- The C compiler identification is Clang 12.0.8 -- The CXX compiler identification is Clang 12.0.8 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Users/divit/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Users/divit/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done
C++ build system [configure] failed while executing: @echo off "C:\Users\divit\AppData\Local\Android\Sdk\cmake\3.22.1\bin\cmake.exe" ^ "-HC:\Users\divit\Nutrify\nutodaymobileapp\node_modules\react-native-vision-camera\android" ^ "-DCMAKE_SYSTEM_NAME=Android" ^ "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ^ "-DCMAKE_SYSTEM_VERSION=26" ^ "-DANDROID_PLATFORM=android-26" ^ "-DANDROID_ABI=x86" ^ "-DCMAKE_ANDROID_ARCH_ABI=x86" ^ "-DANDROID_NDK=C:\Users\divit\AppData\Local\Android\Sdk\ndk\23.1.7779620" ^ "-DCMAKE_ANDROID_NDK=C:\Users\divit\AppData\Local\Android\Sdk\ndk\23.1.7779620" ^ "-DCMAKE_TOOLCHAIN_FILE=C:\Users\divit\AppData\Local\Android\Sdk\ndk\23.1.7779620\build\cmake\android.toolchain.cmake" ^ "-DCMAKE_MAKE_PROGRAM=C:\Users\divit\AppData\Local\Android\Sdk\cmake\3.22.1\bin\ninja.exe" ^ "-DCMAKE_CXX_FLAGS=-O2 -frtti -fexceptions -Wall -Wno-unused-variable -fstack-protector-all" ^ "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\divit\Nutrify\nutodaymobileapp\node_modules\react-native-vision-camera\android\build\intermediates\cxx\Debug\142u2c03\obj\x86" ^ "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=C:\Users\divit\Nutrify\nutodaymobileapp\node_modules\react-native-vision-camera\android\build\intermediates\cxx\Debug\142u2c03\obj\x86" ^ "-DCMAKE_BUILD_TYPE=Debug" ^ "-DCMAKE_FIND_ROOT_PATH=C:\Users\divit\Nutrify\nutodaymobileapp\node_modules\react-native-vision-camera\android\.cxx\Debug\142u2c03\prefab\x86\prefab" ^ "-BC:\Users\divit\Nutrify\nutodaymobileapp\node_modules\react-native-vision-camera\android\.cxx\Debug\142u2c03\x86" ^ -GNinja ^ "-DANDROID_STL=c++_shared" ^ "-DNODE_MODULES_DIR=C:\Users\divit\Nutrify\nutodaymobileapp\node_modules" ^ "-DENABLE_FRAME_PROCESSORS=true" from C:\Users\divit\Nutrify\nutodaymobileapp\node_modules\react-native-vision-camera\android VisionCamera: Frame Processors enabled! CMake Error in CMakeLists.txt: Imported target "react-native-worklets-core::rnworklets" includes non-existent path
"C:/Users/divit/Nutrify/nutodaymobileapp/node_modules/react-native-worklets-core/android/build/headers/rnworklets"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
The path was deleted, renamed, or moved to another location.
An install or uninstall procedure did not complete successfully.
The installation package was faulty and references files it does not provide.
CMake Generate step failed. Build files cannot be regenerated correctly.
i have "react-native-worklets-core": "^0.2.4", and "react-native-vision-camera": "3.6.4",
it is searching for a file which does not even exists node_modules/react-native-worklets-core/android/build/headers/rnworklets
Clean your cache and try again. For me it works in a new project.
We are still facing this error while building using Android Studio. Any suggestions? thanks These are the versions
"react-native-vision-camera": "^3.6.12",
"react-native-worklets-core": "^0.3.0",
same here
I'm still getting this issue after the following attempts to fix it: 1) deleting the android/.gradle folder 2) clearing all cache in android studio and restarting 3) working in a fresh isolated (linux) container 4) working on a fresh computer (mac os)
Edit: Quite literally immediately after posting this I tried deleting the .gradle folder again and it did work. Maybe it's luck based. It also may be that there were background tasks still going on to decache some files and waiting a bit for me to type this message allowed it to finish up.
Also facing it now
"react-native-vision-camera": "4.0.5",
"react-native-worklets-core": "^1.3.3",
"vision-camera-resize-plugin": "^3.1.0",
"@ismaelmoreiraa/vision-camera-ocr": "^3.0.1",
This is the error:
> Task :prepareKotlinBuildScriptModel UP-TO-DATE
C/C++: VisionCamera: Frame Processors: ON!
C/C++: VisionCamera: Linking react-native-worklets...
C/C++: CMake Error in CMakeLists.txt:
C/C++: Imported target "react-native-worklets-core::rnworklets" includes
C/C++: non-existent path
C/C++: "C:/projects/RC/x-workspace/projects/xmobile/node_modules/react-native-worklets-core/android/build/headers/rnworklets"
C/C++: in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
C/C++: * The path was deleted, renamed, or moved to another location.
C/C++: * An install or uninstall procedure did not complete successfully.
C/C++: * The installation package was faulty and references files it does not
C/C++: provide.
C/C++: CMake Generate step failed. Build files cannot be regenerated correctly.
Also facing it now
"react-native-vision-camera": "4.0.5", "react-native-worklets-core": "^1.3.3", "vision-camera-resize-plugin": "^3.1.0", "@ismaelmoreiraa/vision-camera-ocr": "^3.0.1",
This is the error:
> Task :prepareKotlinBuildScriptModel UP-TO-DATE C/C++: VisionCamera: Frame Processors: ON! C/C++: VisionCamera: Linking react-native-worklets... C/C++: CMake Error in CMakeLists.txt: C/C++: Imported target "react-native-worklets-core::rnworklets" includes C/C++: non-existent path C/C++: "C:/projects/RC/x-workspace/projects/xmobile/node_modules/react-native-worklets-core/android/build/headers/rnworklets" C/C++: in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include: C/C++: * The path was deleted, renamed, or moved to another location. C/C++: * An install or uninstall procedure did not complete successfully. C/C++: * The installation package was faulty and references files it does not C/C++: provide. C/C++: CMake Generate step failed. Build files cannot be regenerated correctly.
Same issue
Also facing it now
"react-native-vision-camera": "4.0.5", "react-native-worklets-core": "^1.3.3", "vision-camera-resize-plugin": "^3.1.0", "@ismaelmoreiraa/vision-camera-ocr": "^3.0.1",
This is the error:
> Task :prepareKotlinBuildScriptModel UP-TO-DATE C/C++: VisionCamera: Frame Processors: ON! C/C++: VisionCamera: Linking react-native-worklets... C/C++: CMake Error in CMakeLists.txt: C/C++: Imported target "react-native-worklets-core::rnworklets" includes C/C++: non-existent path C/C++: "C:/projects/RC/x-workspace/projects/xmobile/node_modules/react-native-worklets-core/android/build/headers/rnworklets" C/C++: in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include: C/C++: * The path was deleted, renamed, or moved to another location. C/C++: * An install or uninstall procedure did not complete successfully. C/C++: * The installation package was faulty and references files it does not C/C++: provide. C/C++: CMake Generate step failed. Build files cannot be regenerated correctly.
I encountered the same error, have you resolved the above error?
I'm facing this issue! how you guys able to fix?
Android Studio Koala | 2024.1.1 Patch 2 macOS 14.4 react native 0.74.5 react-native-vision-camera: 4.3.2 react-native-worklets-core: 1.3.3
same error
react-native: 0.74.5
react-native-reanimated: 3.10.1
react-native-vision-camera: 3.9.2
react-native-worklets-core: 1.3.3
I got the same error I tried deleting the file many times like most suggested, but it didn't work for me I also tried upgrading the libraries (react-native-reanimated, react-native-vision-camera, react-native-worklets-core) to different versions (including the latest) but still got the same error
I am waiting for a more accurate solution, can anyone help me?
react-native: 0.74.5 react-native-reanimated: 3.10.1 react-native-vision-camera: 3.9.2 react-native-worklets-core: 1.3.3
I got the same error I tried deleting the file many times like most suggested, but it didn't work for me I also tried upgrading the libraries (react-native-reanimated, react-native-vision-camera, react-native-worklets-core) to different versions (including the latest) but still got the same error
I am waiting for a more accurate solution, can anyone help me?
react-native-vision-camera: 3.9.2 work with react-native-worklets-core: 0.3.0
react-native: 0.74.5 react-native-reanimated: 3.10.1 react-native-vision-camera: 3.9.2 react-native-worklets-core: 1.3.3
I got the same error I tried deleting the file many times like most suggested, but it didn't work for me I also tried upgrading the libraries (react-native-reanimated, react-native-vision-camera, react-native-worklets-core) to different versions (including the latest) but still got the same error I am waiting for a more accurate solution, can anyone help me?
react-native-vision-camera: 3.9.2 work with react-native-worklets-core: 0.3.0
thanks, maybe i will try later
i noticed that react-native-worklets-core was recently added (from react upgrade recommendation), the previous build didn't have it.
i'm not sure what the purpose of adding this lib is, but i removed it, everything still works
{ "name": "TestDetection", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", "test": "jest" }, "dependencies": { "react": "18.2.0", "react-native": "0.74.5", "react-native-reanimated": "^3.15.4", "react-native-vision-camera": "^4.5.2", "react-native-worklets-core": "^1.3.3" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/babel-preset": "0.74.87", "@react-native/eslint-config": "0.74.87", "@react-native/metro-config": "0.74.87", "@react-native/typescript-config": "0.74.87", "@types/react": "^18.2.6", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.6.3", "eslint": "^8.19.0", "jest": "^29.6.3", "prettier": "2.8.8", "react-test-renderer": "18.2.0", "typescript": "5.0.4" }, "engines": { "node": ">=18" } }
this one works for me
How were you trying to build the app?
yarn start --reset-cache
Getting an error during build when I have react-native-worklets-core installed for frame processors. If I delete and reinstall node_modules, I can build 0-2 times before the error comes back. Using an almost fresh copy of rn 0.73 with only other module being opencv for frame processor. Tried earlier versions of worklets-core back to 0.2.0. Works fine without rnwc and/or with frame processors disabled.
Any help would be much appreciated.
The example app doesn't appear to be working for other reasons.
Full build logs
Project dependencies
VisionCamera Version
3.6.16
Target platforms
Android
Operating system
Windows
Can you build the VisionCamera Example app?
No, I cannot build the Example app either
Additional information