Cannot build android app.
Description
Hi,After installing the vision camera & vision camera OCR with the dependency package react-native reanimated, React-native reanimated throws a compile time error.
CMake Error at CMakeLists.txt:208 (find_package): Could not find a package configuration file provided by "react-native-reanimated" with any of the following names: react-native-reanimatedConfig.cmake react-native-reanimated-config.cmake Add the installation prefix of "react-native-reanimated" to CMAKE_PREFIX_PATH or set "react-native-reanimated_DIR" to a directory containing one of the above files. If "react-native-reanimated" provides a separate development package or SDK, be sure it has been installed.
Steps to reproduce
- Installed the react-native reanimated package
- Modified Babel to module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: [ [ 'react-native-reanimated/plugin', { globals: ['__scanOCR'], }, ], ]
};
- Hit npx react-native run-android which landed me to the above issue
Snack or a link to a repository
none
Reanimated version
3.5.4
React Native version
0.70.6
Platforms
Android
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
Debug mode
Device
Real device
Device model
No response
Acknowledgements
Yes
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
Hello! I have the same error, Is there any update?
Update!
I made a downgrade in react-native-reanimated to version 3.4.2 and it works for me.
Hey @ravikiranavasarala, thanks for submitting this issue. Which version of react-native-vision-camera are you using? I can confirm [email protected] works correctly with [email protected].
Is there any update on this issue? I'm using [email protected] and [email protected].
@tomekzaw @thongquach @DanielAraldi @ravikiranavasarala I am facing the same issue on 0.72.6 with react native reanimated version 3.5.4? This is the error message from android studio: from /Users/apple/Desktop/UsmanData/PetroRigs/node_modules/react-native-reanimated/android CMake Error at CMakeLists.txt:48 (find_package): Could not find a package configuration file provided by "fbjni" with any of the following names:
fbjniConfig.cmake
fbjni-config.cmake
Add the installation prefix of "fbjni" to CMAKE_PREFIX_PATH or set "fbjni_DIR" to a directory containing one of the above files. If "fbjni" provides a separate development package or SDK, be sure it has been installed.
Is there any update on this one @tomekzaw? I'm using [email protected] and [email protected].
Is there any update on this one @tomekzaw? I'm using
[email protected] and [email protected].
try [email protected] and [email protected].
I do not use react-native-vision-camera but still having the same issue
更新!
我降级到
react-native-reanimated版本3.4.2,它对我有用。
yes you are right
@tomekzaw @thongquach @DanielAraldi @ravikiranavasarala I am facing the same issue on 0.72.6 with react native reanimated version 3.5.4? This is the error message from android studio: from /Users/apple/Desktop/UsmanData/PetroRigs/node_modules/react-native-reanimated/android CMake Error at CMakeLists.txt:48 (find_package): Could not find a package configuration file provided by "fbjni" with any of the following names:
fbjniConfig.cmake fbjni-config.cmakeAdd the installation prefix of "fbjni" to CMAKE_PREFIX_PATH or set "fbjni_DIR" to a directory containing one of the above files. If "fbjni" provides a separate development package or SDK, be sure it has been installed.
I was facing this isssue but i have deleted the android folder and created it again and then the dependencies were installed correctly i guess it has something to do wiht the latest version of react native with the android project of react native by using the command mentioned and turns out that the things are working fine till now: npx react-native eject
Hmmm, I think I'm hitting this, too. Versions:
-
react-native: 0.70.13 -
react-native-reanimated: 3.5.4 -
react-native-vision-camera: 2.16.5
I've confirmed that I can build for Android if I downgrade to 3.4.2, however, doing so causes react-native-vision-camera frame processors to fail on iOS due to what appears to be version compatibility.
WARN Frame Processors are disabled because you're using an incompatible version of Reanimated.
ERROR frame-processor/unavailable: Frame Processors are not enabled. See https://react-native-vision-camera.com/docs/guides/troubleshooting
Same result when I downgrade to react-native-vision-camera 2.16.2 alongside react-native-reanimated 3.4.2.
@chiubaka for me it seemed that it was only due to the dependencies not being downloaded correctly at my end due to upgrading project from older react version to new version. There must be some easy way to do this all process also.
Update!
I made a downgrade in
react-native-reanimatedto version3.4.2and it works for me.
This worked for me, but if you're using react-native-vision-camera 2x, you're not being able to use frame-processors, but it's working.
Can anyone confirm if it problem is still exists in the newest Reanimated version? 🙏
im using react-native:'0.76.0', react-native-reanimated:'3.15.1' im getting this error