Closed c-info closed 10 months ago
I am also facing these crashes. even the example files are also not working
I had the same issue, and following the troubleshooting steps from the doc fixed the problem. Especially :
./android/gradlew clean
rm -rf android/.gradle android/.idea android/app/build android/build
rm -rf package-lock.json yarn.lock node_modules
yarn # or `npm i`
That made it buildable, but I still get the following when the JS is building:
Error: While trying to resolve module `@mgcrea/vision-camera-code-scanner` from file `vision-camera-barcode-scanner/example/src/App.tsx`, the package `vision-camera-barcode-scanner/example/node_modules/@mgcrea/vision-camera-code-scanner/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`vision-camera-barcode-scanner/example/node_modules/@mgcrea/vision-camera-code-scanner/dist/index.js`.
Having the same issue. clearing build folders, node_modules and cache did not do the trick for me. Any other workaround?
I had the same issue, and following the troubleshooting steps from the doc fixed the problem. Especially :
./android/gradlew clean rm -rf android/.gradle android/.idea android/app/build android/build rm -rf package-lock.json yarn.lock node_modules yarn # or `npm i`
Thanks! For me it's enough to run
./android/gradlew clean
rm -rf android/.gradle
Hey - yep this is a caching issue.
Hello, what worked for me was npm install react-native-worklets-core@latest && npm install react-native-vision-camera@latest
This warning message is generated by the C/C++ compiler when compiling the code in the WKTJsiSetImmediateDecorator.h file of the react-native-worklets-core module.
The warning indicates that the format specified in the printf function does not match the type of the argument provided. Specifically, the %lu format is used to print a value of type unsigned long, but the argument provided is of type size_t, which is usually defined as an alias for unsigned int.
To correct this problem, you can simply change the format in the printf function to match the type of the argument. In this case you can use %zu for size_t:
node_modules/react-native-worklets-core/cpp/decorators/WKTJsiSetImmediateDecorator.h
printf("ctx %zu: setImmediate\n", context->getContextId());
Thanks ChatGPT 👍
I had the same issue, and following the troubleshooting steps from the doc fixed the problem. Especially :
./android/gradlew clean rm -rf android/.gradle android/.idea android/app/build android/build rm -rf package-lock.json yarn.lock node_modules yarn # or `npm i`
I have faced the same issue when I try to clone project and deploy again. When pushing to remote some files of course ignored and when you clone back, it creates cache issues afaiu.
gradlew clean did not work for me, it kept saying clean task not found, I don't know why. I skipped that.
I just did:
rm -rf android (if you have changes, you will lose them!)
rm -rf node_modules package-lock.json
npm i
How were you trying to build the app?
Cannot build on android getting error
Already tried on given link
https://github.com/mrousavy/react-native-vision-camera/issues/1708#issuecomment-1690448880
Full build logs
Project dependencies
VisionCamera Version
3.6.16
Target platforms
Android
Operating system
MacOS
Can you build the VisionCamera Example app?
No, I cannot build the Example app either
Additional information