I’m trying to integrate camera functionality on my react native app, during build process, a error react-native-vision-camera is stopping build process.
Error log:
Task :react-native-vision-camera:compileDebugKotlin FAILED
Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.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$GradleKotlinCompilerWorkBUILD FAILED in 2m 12s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use
unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:UsersSENTIENTGEEKSDesktopnativecamera_appnode_modulesreact-native-safe-area-contextandroidsrcpaperjavacomth3rdwavesafeareacontextNativeSafeAreaContextSpec.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:UsersSENTIENTGEEKSDesktopnativecamera_appnode_modulesreact-native-worklets-coreandroidsrcmainjavacomworkletsWorkletsPackage.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. e: file:///C:/Users/SENTIENTGEEKS/Desktop/native/camera_app/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt:31:79 This API is provided only for React Native frameworks and not intended for general users. This API can change between minor versions in alignment with React Native frameworks and won’t be considered a breaking change. e: file:///C:/Users/SENTIENTGEEKS/Desktop/native/camera_app/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt:36:19 This API is provided only for React Native frameworks and not intended for general users. This API can change between minor versions in alignment with React Native frameworks and won’t be considered a breaking change. e: file:///C:/Users/SENTIENTGEEKS/Desktop/native/camera_app/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCaovided only for React Native frameworks and not intended for general users. This API can change between minor versions in alignmend won’t be considered a breaking change. e: file:///C:/Users/SENTIENTGEEKS/Desktop/native/camera_app/node_modules/react-native-va/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt:75:73 This API is provided only for React Native frameworks and not inI can change between minor versions in alignment with React Native frameworks and won’t be considered a breaking change. FAILURE:
What went wrong: Execution failed for task ‘:react-native-vision-camera:compileDebugKotlin’. > A failure occurred while executiunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction > Compilation error. See log for more details * Try: > Run w
log for more details
I have tried executing
npx react-native doctor
with no error log.
Also I have tried changing kotlinVersion from 1.9.22 into my build.gradle file
buildscript {
ext {
buildToolsVersion = “34.0.0”
minSdkVersion = 23
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = “26.1.10909125”
kotlinVersion = “1.6.20”
}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”)
classpath(“com.android.tools.build:gradle:7.3.1”)
}
}apply plugin: “com.facebook.react.rootproject”
Nothing worked, help me to solve this error in react-native-vision-camera
coder_monkey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.