react-native-vision-camera
react-native-vision-camera copied to clipboard
π react-native 0.69.3 android build crash
What were you trying to do?
I want to build an android application, but I got this error I am working on RN 0.69.3
Reproduceable Code
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\48791\OneDrive\Pulpit\sewio-mobile\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 'C:\Users\48791\OneDrive\Pulpit\sewio-mobile\node_modules/react-native/android' to contain exactly one file, however, it contains more than one file.
What happened instead?
App can not build and npx react-native run-android crash. If i disable frame processors in android/gradle.propeties app builds correctly.
Relevant log output
No response
Device
Samsung S8
VisionCamera Version
2.14.0
Additional information
- [ ] I am using Expo
- [X] I have read the Troubleshooting Guide
- [X] I agree to follow this project's Code of Conduct
- [X] I searched for similar issues in this repository and found none.
Same issue on
React Native - 0.69.1 React Native Vision Camera - 2.14.0 React Native Reanimated - 2.9.1 Vision Camera Code Scanner - 2.14.1
same issue
Build was successful after running npx patch-package react-native-vision-camera Must have the patch installed though, see nobane's answer above. Weird cause I was running the 2.14.0 one which should've had the fix.
Same issue for me: "react": "18.0.0", "react-native": "0.69.3", "react-native-reanimated": "^2.9.1", "react-native-vision-camera": "^2.14.0"
I ran the npx patch call and nothing changed
Edit to say that I got it to work using a workaround. I applied patch 2.13.5 to my project and now it builds and installs on my android phone. The dependencies now look like this:
"patch-package": "^6.4.7",
"react": "18.0.0",
"react-native": "0.69.3",
"react-native-reanimated": "^2.9.1",
"react-native-vision-camera": "^2.13.5"
should really think about merging this one https://github.com/mrousavy/react-native-vision-camera/pull/1116/files
add disableFrameProcessors=true in gradle.properties will work on android
That fixes the build issue, but since we are still using frame processors, we can't turn that flag off.
@spsaucier did you find anything on this? I'm stuck with the same issue, also need to keep frame processors on.
I havenβt - hoping the relevant PR will be merged very soon ( https://github.com/mrousavy/react-native-vision-camera/pull/1116).
On Mon, Aug 1, 2022 at 6:43 PM Eddie Flores @.***> wrote:
@spsaucier https://github.com/spsaucier did you find anything on this? I'm stuck with the same issue, also need to keep frame processors on.
β Reply to this email directly, view it on GitHub https://github.com/mrousavy/react-native-vision-camera/issues/1164#issuecomment-1201805680, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAERRL7E4LLYZ37B5YTRTJTVXBHH3ANCNFSM54VMGWZA . You are receiving this because you were mentioned.Message ID: @.***>
--
Stephen Saucier (706) 225-9155
This should be fixed as of the latest release, #1116 was superseded by #1186 and merged in the latest release