Skip to content
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

[BUG 🐛] Task :react-native-vision-camera-face-detector:compileDebugKotlin #71

Closed
ibrahim-developes opened this issue Jun 12, 2024 · 8 comments
Labels
good first issue Good for newcomers

Comments

@ibrahim-developes
Copy link

ibrahim-developes commented Jun 12, 2024

Describe the bug:
Building on android after installing react-native-vision-camera produces the following error:

e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt:14:28 Unresolved reference: types
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt:15:28 Unresolved reference: frameprocessor
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt:16:28 Unresolved reference: frameprocessor
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt:17:28 Unresolved reference: frameprocessor
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt:21:10 Unresolved reference: VisionCameraProxy
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt:23:5 Unresolved reference: FrameProcessorPlugin
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt:234:18 Unresolved reference: Orientation
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt:236:12 'when' expression must be exhaustive, add necessary 'else' branch
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt:237:7 Unresolved reference: Orientation
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt:238:7 Unresolved reference: Orientation
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt:239:7 Unresolved reference: Orientation
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt:240:7 Unresolved reference: Orientation
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt:244:3 'callback' overrides nothing
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPlugin.kt:245:12 Unresolved reference: Frame
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPluginPackage.kt:7:28 Unresolved reference: frameprocessor
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPluginPackage.kt:12:7 Unresolved reference: FrameProcessorPluginRegistry
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPluginPackage.kt:13:9 Cannot infer a type for this parameter. Please specify it explicitly.
e: file:///Users/ibrahim/Desktop/ConstructionApp/node_modules/react-native-vision-camera-face-detector/android/src/main/java/com/visioncamerafacedetector/VisionCameraFaceDetectorPluginPackage.kt:13:16 Cannot infer a type for this parameter. Please specify it explicitly.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-vision-camera-face-detector:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

Expected behavior:
App should install smoothly

I have tryed:
multiple version of both the packages react-native-vision-camera and react-native-vision-camera-face-detector

Device:

  • Device: SamsungA30s
  • OS: Android

package.json file:

@ibrahim-developes ibrahim-developes added the bug Something isn't working label Jun 12, 2024
@ibrahim-developes
Copy link
Author

ibrahim-developes commented Jun 12, 2024

"react-native-vision-camera": "4.0.4",
"react-native-worklets-core": "1.3.3",
"react-native-vision-camera-face-detector": "1.6.1"

@w3Enzo
Copy link

w3Enzo commented Jun 14, 2024

go to android dir => rm -rf ./gradle && ./gradlew clean

@ibrahim-developes
Copy link
Author

go to android dir => rm -rf ./gradle && ./gradlew clean

@w3Enzo this will delete the gradlew files

@w3Enzo
Copy link

w3Enzo commented Jun 17, 2024

@ibrahim-developes oh my mistake
rm -rf ./gradle && ./gradlew clean => rm -rf .gradle/ && ./gradlew clean
not ./gradle
yes .gradle

@luicfrr
Copy link
Owner

luicfrr commented Jun 17, 2024

can you reproduce this error on example app?

@ibrahim-developes
Copy link
Author

Yeah working to get one

@ibrahim-developes
Copy link
Author

I built a new demo project and it worked like a charm,
closing it as this has nothing to do with package but cache on android.

cd android
m -rf .gradle/ && ./gradlew clean

@luicfrr luicfrr added good first issue Good for newcomers and removed bug Something isn't working labels Jun 24, 2024
@huyhai

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants