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

🐛 react-native-reanimated build issue #1120

Closed
3 of 4 tasks
mrozkosz opened this issue Jul 5, 2022 · 5 comments · Fixed by #1466
Closed
3 of 4 tasks

🐛 react-native-reanimated build issue #1120

mrozkosz opened this issue Jul 5, 2022 · 5 comments · Fixed by #1466
Labels
🐛 bug Something isn't working

Comments

@mrozkosz
Copy link

mrozkosz commented Jul 5, 2022

What were you trying to do?

@mrousavy When I install react-native-vision-camera the application builds correctly. But after installing react-native-reanimated it crashes.

Reproduceable Code

No response

What happened instead?

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 app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • Where:
    Build file '/Users/Documents/app/node_modules/react-native-vision-camera/android/build.gradle' line: 231

  • What went wrong:
    A problem occurred evaluating project ':react-native-vision-camera'.

Expected directory '/Users/Documents/app/node_modules/react-native/android' to contain exactly one file, however, it contains more than one file.

  • 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 (/Users/Documents/app/node_modules/execa/index.js:174:9)
at /Users/Documents/app/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (/Users/Documents/app/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
at async Command.handleAction (/Users/Documents/app/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:192:9)

info Run CLI with --verbose flag for more details.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app@0.0.1 android: react-native run-android
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app@0.0.1 android script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/praca/.npm/_logs/2022-07-05T
Zrzut ekranu 2022-07-5 o 17 19 31
15_05_44_102Z-debug.log

Relevant log output

No response

Device

Android

VisionCamera Version

2.13.5

Additional information

@mrozkosz mrozkosz added the 🐛 bug Something isn't working label Jul 5, 2022
@mocanSergiu666
Copy link

"react": "18.0.0"
"react-native": "0.69.3"
"react-native-vision-camera": "^2.14.0"
"react-native-reanimated": "^2.9.1" <--------- After I install this package, the Android build fails with the next error:

  • What went wrong:
    A problem occurred evaluating project ':react-native-vision-camera'.

Expected directory '.../node_modules/react-native/android' to contain exactly one file, however, it contains more than one file.

If I uninstall "react-native-reanimated", the build succeeds.

Could anybody take a look at this issue, please? Thanks in advance!

@spsaucier
Copy link

This PR might fix this issue: #1116

@danhsucowboy
Copy link

I have the same problem.
I already have react-native-vision-camera in the project. Whenever I install react-native-reanimated and rebuild the project again, it crashes.

It also shows a log with this:

> Configure project :react-native-vision-camera
VisionCamera: node_modules/ found at: /Users/danhsucowboy/Documents/DanHsu/BoxInThePARK/CaptureToEarn/capture2earn-dapp-v0/node_modules
VisionCamera: Building with JSC...
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.
VisionCamera: Frame Processors are enabled! Building C++ part...
WARNING:DSL element 'dexOptions' is obsolete and should be removed.
It will be removed in version 8.0 of the Android Gradle plugin.
Using it has no effect, and the AndroidGradle plugin optimizes dexing automatically.

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

@Mr-Rith
Copy link

Mr-Rith commented Jan 24, 2023

with
i got the same issue

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

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.

6 participants