react-native-reanimated icon indicating copy to clipboard operation
react-native-reanimated copied to clipboard

Cannot build android app.

Open ravikiranavasarala opened this issue 2 years ago • 14 comments

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.

Screenshot 2023-10-04 at 10 18 34 AM

Steps to reproduce

  1. Installed the react-native reanimated package
  2. Modified Babel to module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: [ [ 'react-native-reanimated/plugin', { globals: ['__scanOCR'], }, ], ]

};

  1. 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

ravikiranavasarala avatar Oct 04 '23 05:10 ravikiranavasarala

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?

github-actions[bot] avatar Oct 04 '23 05:10 github-actions[bot]

Hello! I have the same error, Is there any update?

DanielAraldi avatar Oct 06 '23 13:10 DanielAraldi

Update!

I made a downgrade in react-native-reanimated to version 3.4.2 and it works for me.

DanielAraldi avatar Oct 06 '23 13:10 DanielAraldi

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].

tomekzaw avatar Oct 11 '23 12:10 tomekzaw

Is there any update on this issue? I'm using [email protected] and [email protected].

thongquach avatar Oct 26 '23 08:10 thongquach

@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.

usmanabid94 avatar Oct 27 '23 05:10 usmanabid94

Is there any update on this one @tomekzaw? I'm using [email protected] and [email protected].

thongquach avatar Oct 30 '23 09:10 thongquach

Is there any update on this one @tomekzaw? I'm using [email protected] and [email protected].

try [email protected] and [email protected].

mssoliveira avatar Nov 01 '23 12:11 mssoliveira

I do not use react-native-vision-camera but still having the same issue

huyvuskedulo avatar Nov 09 '23 04:11 huyvuskedulo

更新!

我降级到react-native-reanimated版本3.4.2,它对我有用。

yes you are right

WhereareUmylove avatar Nov 10 '23 02:11 WhereareUmylove

@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.

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

usmanabid94 avatar Nov 14 '23 05:11 usmanabid94

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 avatar Nov 23 '23 02:11 chiubaka

@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.

usmanabid94 avatar Nov 24 '23 05:11 usmanabid94

Update!

I made a downgrade in react-native-reanimated to version 3.4.2 and 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.

HubertRyanOfficial avatar Jun 04 '24 10:06 HubertRyanOfficial

Can anyone confirm if it problem is still exists in the newest Reanimated version? 🙏

piaskowyk avatar Sep 20 '24 15:09 piaskowyk

im using react-native:'0.76.0', react-native-reanimated:'3.15.1' im getting this error

sudeshvs avatar Oct 29 '24 10:10 sudeshvs