-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
🔧 V2.16.1 and react-native 0.72.4 android Execution failed for task ':react-native-vision-camera:buildCMakeDebug[arm64-v8a]'. #1814
Comments
I'm just stuck on the same error right now :( |
2.16.1? |
I have the same error too:
|
Same here on 3.0 |
I tried building the project with both CMake versions 3.22.1 and 3.18.1 individually, but the problem persisted. The error did change with version 3.22.1. However, I was able to build using CMake version 3.18 when the frame processor was disabled. |
Can we use react-native-worklets-core in V2.16.1? In v3 this solution is working. So could we use react-native-worklets-core in v2.16.1 also? |
Surprisingly, this morning, no more errors with v2.16.1. I couldn't use v3 since I'm also using Not sure about what solved the issue, since I've done a lot of things: React native update to v0.72.4, Android studio update to Giraffe (I can't believe I'm writing such a version name) + Invalidate cache + clean + rebuild project. But now it works. I still have to test my entire app to check if everything works correctly. I'll keep you updated. |
I solved this issue by changing the latest version of react-native-reanimated to just My full dependencies:
|
I confirm I'm using I've also applied this patch to diff --git a/node_modules/react-native-vision-camera/android/build.gradle b/node_modules/react-native-vision-camera/android/build.gradle
index 9b14ec7..3fd5ab3 100644
--- a/node_modules/react-native-vision-camera/android/build.gradle
+++ b/node_modules/react-native-vision-camera/android/build.gradle
@@ -90,7 +90,6 @@ buildscript {
apply plugin: 'com.android.library'
apply plugin: 'de.undercouch.download'
apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
def getExtOrDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['VisionCamera_' + name] |
It works fine on react-native-reanimated 3.5.1 and also on 3.5.3 |
@mrousavy Sorry for pinging you here, I tried the versions today whet @DavideSegullo suggested, but I have an other problem. It says:
Do you have any idea what could be the problem? I checked everything where minSdk can be set and I am sure I set 26 everywhere possible. After cleaning rebuilding the project it still does not work. |
can you reproduce it in a repo? |
This is a result of |
@Skizu Yes my minSdkVersion is set to 26. Can I change it somehow for me in vision-camera code? Or should I just revert it back to 21 and it will work? If I remember well Marc written somewhere that it should be set to 26. Maybe it was only for v3.. I cant tell. |
You can make a patch for Currently |
@Skizu Thank you very much it is finally building with this patch 🙂 |
@stemyke are you building for hermes? What versions are you using? I am still unable to build Release APKs or Bundles for JSC using the below versions with patches to "react-native": "0.72.4",
"react-native-reanimated": "^3.5.4",
"react-native-vision-camera": "2.16.1", |
@Skizu It looks like reanimated team released again a new version that you are using a few hours ago. It seems it again has the original problem by not finding the extractWorklets method, so I stick my package.json to "react-native-reanimated": "3.5.3". I am using Hermes by the way yes. |
@Skizu For now I am stuck again with an other problem. If I attach a frame processor to my camera then the app is frozen complately. Even if it just contains a simple console.log const frameProcessor = useFrameProcessor(
frame => {
'worklet';
console.log(frame.toString());
},
[],
);
|
Of course, you shouldn't parse the frame as a string at the maximum refresh rate. That's completely normal. |
@WanderingBit Why would it be normal? The toString() method generally just printing out the frame's width and height. Even if I set frameProcessorFps to 1 which is by Marcs saying is the default value actually it still does not work. |
My solution did not unfortunately work. I am confused. Because sometimes it build successful unexpectedly (with frame processor enabled), and most of the time it does not work and produced this kind of error. TBH I do not know the reason why this happen. tried a bunch of things, hopefully this will be resolved soon. |
I am also facing the same issue, Sometimes it builds but after |
Create that patch and use patch-package:
I created a PR with the solution: |
Hello @KarlosQ I am new to this, how do you create a patch and use that patch package? |
@JmePaz You just have to create a patches folder, in your projects root where react-native-vision-camera+2.16.1.patch Install Add this one to your package.json inside the scripts object:
Run |
Unfortunately it does not works for me :( . |
@JmePaz If you are experiencing the original error, not what @stemyke mentioned, then this patch would not help you. We are still facing the original error too after cleaning the project. We always change the reanimated version to something else in package.json do an install again, and hit play again in Android Studio. This way the error usually goes away but not always unfortunately. Probably some path is missing from CMakeLists in VisionCamera or could not be resolved automatically in certain scenarios. |
@metrix-hu True, Unfortunately I am trying everything I can HUHUHHUHH straight for two days but nothing works. It looks like I had to give up using this module/package for now. Any recommendation for alternative package/module. I am building a qr scanner app. (Any recommendation would be appreciated thank you). |
@JmePaz If you are not upgraded yet to latest version of "react-native" 0.72.x, then I might have a solution for you. There were some discussions where I had specific versions for vision-camera and vision-camera-code-scanner and reanimated v2 that worked perfectly for me but unfortunately I cant find it right now. There is an other discussion going around qr code scanning and somebody had an alternative: #1807 (comment) |
For me It's working on IOS and Android using this:
|
@stealkiller06 May I ask if After cleaning the gradle, does it still work? |
For me, It is working with below versions
also i had to add |
Bump |
@stealkiller06 This is using Hermes correct? |
Hey! I think this should be fixed in the latest release, no? |
This is still an active issue. Using react native 0.72 with JSC does not compile
… Hey! I think this should be fixed in the latest release, no?
|
As @stealkiller06 says here I confirm even using "react-native": "0.72.5", this solution works (tested in Android only) Edit: And my minSdkVersion is 21 as in React native Docs Awesome Project, and I don't have hermesEnabled=false nor newArchEnabled=false |
I can confirm it does not work with a
|
I have same issue after updating react-native-vision-camera from 3.1.0 to 3.2.2. package.json
|
I can confirm that it works but after RNVC v3 does not work with |
This issue was resolved for me by deleting the |
@denisbevilacqua Thank you so much, you saved my time! |
@denisbevilacqua Thank you! sorry for the late reply |
Hi everyone,
To solve the issue I must delete |
If you upgrade to RNVC v3 you don't need |
You don't need Worklets for the simple CodeScanning. |
Hi, what worked for me was updating react-native-worklets-core to 0.3.0. "react-native-vision-camera": "^3.8.2", buildToolsVersion="33.0.0" |
Great to hear! 👍 |
Maybe for someone who is not being able to solve it, you can try reinstalling the NDK from Android Studio. |
Hi there, any solution for this? So i have to remove the .gradle every time after i ./gradlew clean? |
I have the same problem and deleting the .gradle fix it, but I need to do it everytime. I could help also on debugging the problem, but I don't even know where to start. Any help is appreciated.
|
How were you trying to build the app?
npx react-native run-android
Full build logs
Project dependencies
VisionCamera Version
2.16.1
Target platforms
Android
Operating system
Linux
Can you build the VisionCamera Example app?
Yes, I can successfully build the Example app here
Additional information
The text was updated successfully, but these errors were encountered: