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

Cannot build android app. #5175

Open
ravikiranavasarala opened this issue Oct 4, 2023 · 15 comments
Open

Cannot build android app. #5175

ravikiranavasarala opened this issue Oct 4, 2023 · 15 comments
Labels
Close when stale This issue is going to be closed when there is no activity for a while Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android

Comments

@ravikiranavasarala
Copy link

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 ravikiranavasarala added the Needs review Issue is ready to be reviewed by a maintainer label Oct 4, 2023
@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Oct 4, 2023
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

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 github-actions bot added the Platform: Android This issue is specific to Android label Oct 4, 2023
@DanielAraldi
Copy link

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

@DanielAraldi
Copy link

Update!

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

@tomekzaw
Copy link
Member

tomekzaw commented Oct 11, 2023

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

@thongquach
Copy link

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

@usmanabid94
Copy link

usmanabid94 commented Oct 27, 2023

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

@thongquach
Copy link

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

@mssoliveira
Copy link

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

try [email protected] and [email protected].

@huyvuskedulo
Copy link

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

@WhereareUmylove
Copy link

更新!

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

yes you are right

@usmanabid94
Copy link

@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

@chiubaka
Copy link

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.

@usmanabid94
Copy link

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

@HubertRyanOfficial
Copy link

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.

@piaskowyk
Copy link
Member

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

@piaskowyk piaskowyk added the Close when stale This issue is going to be closed when there is no activity for a while label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close when stale This issue is going to be closed when there is no activity for a while Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android
Projects
None yet
Development

No branches or pull requests