-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
What's happening?
Bug Report
Description
I encountered an issue while trying to build my React Native project. The build fails with the following error:
Error Message:
Task :react-native-vision-camera:compileDebugKotlin FAILED
Task :react-native-vision-camera:configureCMakeDebug[x86]
C/C++: VisionCamera: Frame Processors: OFF!
52 actionable tasks: 42 executed, 10 up-to-date
info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
[Fatal Error] annotations-31.7.2.pom:2:90: The markup in the document following the root element must be well-formed.
[Fatal Error] annotations-31.7.2.pom:2:90: The markup in the document following the root element must be well-formed.
No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.
e: file:///C:/Users/mubas/Music/awesomeapp/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt:34:1 Class 'CameraSession' is not abstract and does not implement abstract member 'lifecycle'.
e: file:///C:/Users/mubas/Music/awesomeapp/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt:93:3 'getLifecycle' overrides nothing.
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':react-native-vision-camera:compileDebugKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details
- 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 33s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
[Fatal Error] annotations-31.7.2.pom:2:90: The markup in the document following the root element must be well-formed. [Fatal Error] annotations-31.7.2.pom:2:90: The markup in the document following the root element must be well-formed. No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.
e: file:///C:/Users/mubas/Music/awesomeapp/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt:34:1 Class 'CameraSession' is not abstract and does not implement abstract member 'lifecycle'. e: file:///C:/Users/mubas/Music/awesomeapp/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt:93:3 'getLifecycle' overrides nothing. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':react-native-vision-camera:compileDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction > Compilation error. See log for more details * 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 33s.
info Run CLI with --verbose flag for more details.
Environment
- React Native Version: 0.77.0
- React Version: 18.3.1
- React Native Vision Camera Version: 4.6.3
- Android SDK Version: 35
- Build Tools Version: 35.0.0
- Min SDK Version: 24
- Target SDK Version: 34
- NDK Version: 27.1.12297006
- Kotlin Version: 2.0.21
- Gradle Plugin Versions:
com.android.tools.build:gradlecom.facebook.react:react-native-gradle-pluginorg.jetbrains.kotlin:kotlin-gradle-plugin
Steps to Reproduce
- Run
npm installoryarn install. - Run
npx react-native run-android. - Observe the error in the terminal.
Build.gradle Configuration
android/build.gradle
buildscript {
ext {
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 34
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
}
apply plugin: "com.facebook.react.rootproject"Dependencies (package.json)
"dependencies": {
"react": "18.3.1",
"react-native": "0.77.0",
"react-native-vision-camera": "^4.6.3"
}Reproduceable Code
import { View, Text, Button } from 'react-native'
import React from 'react'
import { useCameraPermission } from 'react-native-vision-camera'
const App = () => {
const { hasPermission, requestPermission } = useCameraPermission()
return (
<View>
<Button title='Enable camera'
onPress={requestPermission}
></Button>
</View>
)
}
export default AppRelevant log output
> Task :react-native-vision-camera:compileDebugKotlin FAILED
> Task :react-native-vision-camera:configureCMakeDebug[x86]
C/C++: VisionCamera: Frame Processors: OFF!
52 actionable tasks: 42 executed, 10 up-to-date
info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
[Fatal Error] annotations-31.7.2.pom:2:90: The markup in the document following the root element must be well-formed.
[Fatal Error] annotations-31.7.2.pom:2:90: The markup in the document following the root element must be well-formed.
No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.
e: file:///C:/Users/mubas/Music/awesomeapp/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt:34:1 Class 'CameraSession' is not abstract and does not implement abstract member 'lifecycle'.
e: file:///C:/Users/mubas/Music/awesomeapp/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt:93:3 'getLifecycle' overrides nothing.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-vision-camera:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
* 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 33s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
[Fatal Error] annotations-31.7.2.pom:2:90: The markup in the document following the root element must be well-formed. [Fatal Error] annotations-31.7.2.pom:2:90: The markup in the document following the root element must be well-formed. No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.
e: file:///C:/Users/mubas/Music/awesomeapp/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt:34:1 Class 'CameraSession' is not abstract and does not implement abstract member 'lifecycle'. e: file:///C:/Users/mubas/Music/awesomeapp/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt:93:3 'getLifecycle' overrides nothing. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':react-native-vision-camera:compileDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction > Compilation error. See log for more details * 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 33s.
info Run CLI with --verbose flag for more details.Camera Device
nonDevice
android emulate pixel 7a
VisionCamera Version
^4.6.3
Can you reproduce this issue in the VisionCamera Example app?
I didn't try (
Additional information
- I am using Expo
- I have enabled Frame Processors (react-native-worklets-core)
- I have read the Troubleshooting Guide
- I agree to follow this project's Code of Conduct
- I searched for similar issues in this repository and found none.