rodgomesc / vision-camera-face-detector

VisionCamera Frame Processor Plugin to detect faces using MLKit Vision Face Detector
MIT License
89 stars 65 forks source link

[ANDROID] - Execution failed for task ':vision-camera-face-detector:compileDebugJavaWithJavac' #46

Closed saadHeisentech closed 8 months ago

saadHeisentech commented 8 months ago

I am using react-native-vision-camera in my project, after installing the latest version vision-camera-face-detector": "^0.1.8 the build fails even though I have not used any modules of it. I am using react-native": "0.72.4 and have also gone through the troubleshoot guide. This is the error I receive Execution failed for task ':vision-camera-face-detector:compileDebugJavaWithJavac' I have also set the android versions

buildscript {
    ext {
        buildToolsVersion = "33.0.0"
        minSdkVersion = 26
        compileSdkVersion = 33
        targetSdkVersion = 33
    }
}

How do I resolve this issue?

shashwats-greytip commented 8 months ago

+1

creativekdev commented 8 months ago

I have encountered same issue.

buildToolsVersion = "33.0.0"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 33

"react": "18.2.0",
"react-native": "0.72.6",
"react-native-reanimated": "^3.5.4",
"react-native-vision-camera": "^3.3.1",
"vision-camera-face-detector": "^0.1.8"
saadHeisentech commented 8 months ago

I resolved this issue by downgrading the react-native-vision-camera version and it looks like this

    "react-native-vision-camera": "^2.16.0",
    "vision-camera-face-detector": "github:rodgomesc/vision-camera-face-detector#master"

But I would like to know how will it be resolved with the latest version

creativekdev commented 8 months ago

ERROR frame-processor/unavailable: Frame Processors are not enabled. See https://react-native-vision-camera.com/docs/guides/troubleshooting, js engine: hermes

It showing this issue after running.

image

saadHeisentech commented 8 months ago

ERROR frame-processor/unavailable: Frame Processors are not enabled. See https://react-native-vision-camera.com/docs/guides/troubleshooting, js engine: hermes

It showing this issue after running.

image

You need to install "react-native-worklets-core": "^0.2.2" for frame processors to be enabled and your babel.config.js file should look like this

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: [
    [
      'react-native-reanimated/plugin',
      {
        globals: ['__scanFaces'],
      },
    ],
  ],
};
creativekdev commented 8 months ago

image It's the same, I have tried it right now.