luicfrr / react-native-vision-camera-face-detector

Vision Camera Frame Processor Plugin to detect faces using MLKit Face Detector
https://www.npmjs.com/package/react-native-vision-camera-face-detector
MIT License
75 stars 16 forks source link

react-native-vision-camera-face-detector:compileDebugKotlin #50

Closed SantoshYadavSridix closed 2 months ago

SantoshYadavSridix commented 2 months ago

Describe the bug

Expected behavior App need to run using npm run android.

Logs and Screenshots Screenshot 2024-04-29 at 6 32 20 PM

Smartphone (please complete the following information):

Additional context "react": "18.2.0", "react-native": "0.73.7", // also tried in 0.71.11

Also Tried buildscript { ext { ... kotlinVersion = "1.9.0" } dependencies { ... classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") } } in android/build.gradle

SantoshYadavSridix commented 2 months ago

Also tried kotlinVersion = "1.8.0"

luicfrr commented 2 months ago

I think this issue has the same root cause than #49 but with different errors.

Try this sollution then let me know

SantoshYadavSridix commented 2 months ago

I have tried with deleting node_modules and package-lock.json. But now new issue comes up it is react native vision camera.

/Users/sridix/Library/Android/sdk/cmake/3.22.1/bin/ninja \
        -C \
        "node_modules/react-native-vision-camera/android/.cxx/Debug/2n4l1ga6/arm64-v8a" \
        VisionCamera
    from node_modules/react-native-vision-camera/android

Now, i don't have time to wait for other response. So, i need to go for native modules.

Note: There are some more changes in order to resolve this issue (react-native-vision-camera-face-detector:compileDebugKotlin)
File Location:- node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt
import com.mrousavy.camera.core.types.Orientation
import com.mrousavy.camera.frameprocessors.Frame
import com.mrousavy.camera.frameprocessors.FrameProcessorPlugin
import com.mrousavy.camera.frameprocessors.VisionCameraProxy

Need to add core and frameprocessors(instead of frameprocessor).

luicfrr commented 2 months ago
Note: There are some more changes in order to resolve this issue (react-native-vision-camera-face-detector:compileDebugKotlin)
File Location:- node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt
import com.mrousavy.camera.core.types.Orientation
import com.mrousavy.camera.frameprocessors.Frame
import com.mrousavy.camera.frameprocessors.FrameProcessorPlugin
import com.mrousavy.camera.frameprocessors.VisionCameraProxy

Need to add core and frameprocessors(instead of frameprocessor).

This error is happening because you're messing up with this package version and dependencies versions.

Read 1.6.1 release notes and also double check if you have done this comment's sollution.