mrousavy / react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.
https://react-native-vision-camera.com
MIT License
6.64k stars 983 forks source link

build error #2822

Closed nehalasim closed 2 weeks ago

nehalasim commented 2 weeks ago

How were you trying to build the app?

after installing the vision camera in my react native project

Full build logs

PS C:\Users\aaneh\Documents\RH_Course\prf_surv> npm run android

> prf_surv@0.0.1 android
> react-native run-android

warn Package react-native-sqlite-storage contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
info JS server already running.
info Installing the app...

> Configure project :react-native-vision-camera
[VisionCamera] Thank you for using VisionCamera ??
[VisionCamera] node_modules found at C:\Users\aaneh\Documents\RH_Course\prf_surv\node_modules
[VisionCamera] VisionCamera_enableFrameProcessors is set to true!
[VisionCamera] react-native-worklets-core not found, Frame Processors are disabled!
[VisionCamera] VisionCamera_enableCodeScanner is set to false!

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

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
5 actionable tasks: 5 up-to-date

FAILURE: Build failed with an exception.                                                                                                              

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find any matches for com.facebook.react:react-android:+ as no versions of com.facebook.react:react-android are available.
     Searched in the following locations:
       - file:/C:/Users/aaneh/Documents/RH_Course/prf_surv/node_modules/react-native/android/com/facebook/react/react-android/maven-metadata.xml      
       - file:/C:/Users/aaneh/Documents/RH_Course/prf_surv/node_modules/jsc-android/dist/com/facebook/react/react-android/maven-metadata.xml
       - https://dl.google.com/dl/android/maven2/com/facebook/react/react-android/maven-metadata.xml
       - https://www.jitpack.io/com/facebook/react/react-android/maven-metadata.xml
     Required by:
         project :app > project :react-native-vision-camera

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

* Get more help at https://help.gradle.org

BUILD FAILED in 12s

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

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find any matches for com.facebook.react:react-android:+ as no versions of com.facebook.react:react-android are available.
     Searched in the following locations:
       - file:/C:/Users/aaneh/Documents/RH_Course/prf_surv/node_modules/react-native/android/com/facebook/react/react-android/maven-metadata.xml      
       - file:/C:/Users/aaneh/Documents/RH_Course/prf_surv/node_modules/jsc-android/dist/com/facebook/react/react-android/maven-metadata.xml
       - https://dl.google.com/dl/android/maven2/com/facebook/react/react-android/maven-metadata.xml
       - https://www.jitpack.io/com/facebook/react/react-android/maven-metadata.xml
     Required by:
         project :app > project :react-native-vision-camera

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

* Get more help at https://help.gradle.org

BUILD FAILED in 12s

    at makeError (C:\Users\aaneh\Documents\RH_Course\prf_surv\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
    at C:\Users\aaneh\Documents\RH_Course\prf_surv\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16       
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runOnAllDevices (C:\Users\aaneh\Documents\RH_Course\prf_surv\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (C:\Users\aaneh\Documents\RH_Course\prf_surv\node_modules\@react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.
PS C:\Users\aaneh\Documents\RH_Course\prf_surv>

Project dependencies

{
  "name": "prf_surv",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "moment": "^2.30.1",
    "pod": "^0.9.0",
    "react": "18.1.0",
    "react-native": "0.70.0",
    "react-native-date-picker": "^4.3.6",
    "react-native-element-dropdown": "^2.10.1",
    "react-native-fs": "^2.20.0",
    "react-native-gifted-charts": "^1.3.29",
    "react-native-linear-gradient": "^2.8.3",
    "react-native-navigation": "^7.37.2",
    "react-native-permissions": "^4.1.5",
    "react-native-safe-area-context": "^4.8.1",
    "react-native-sqlite-storage": "^6.0.1",
    "react-native-svg": "^14.1.0",
    "react-native-vision-camera": "^4.0.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "@types/react-native": "^0.73.0",
    "babel-jest": "^26.6.3",
    "eslint": "^7.32.0",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "^0.72.1",
    "react-test-renderer": "18.1.0"
  },
  "jest": {
    "preset": "react-native"
  }
}

VisionCamera Version

4

Target platforms

Android

Operating system

Windows

Can you build the VisionCamera Example app?

I didn't try (⚠️ your issue might get ignored & closed if you don't try this)

Additional information

mrousavy commented 2 weeks ago

You need to use react-native 0.71 or higher.