react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

🔧 RN 0,73 support

Open talaikis opened this issue 3 years ago • 11 comments

How were you trying to build the app?

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-vision-camera:compileDebugKotlin'

Full build logs

N/A

Project dependencies

"dependencvies": {
  "react-native": "0.73.0-rc.5",
  "react-native-vision-camera": "3.6.8"
}

VisionCamera Version

3.6.8

Target platforms

Android

Operating system

Windows

Can you build the VisionCamera Example app?

No, I cannot build the Example app either

Additional information

talaikis avatar Nov 23 '23 17:11 talaikis

I have the same.

"react-native": "0.73.0-rc.5",
"react-native-vision-camera": "^3.6.10"

jeroenvanhattem avatar Nov 23 '23 18:11 jeroenvanhattem

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 51s
info Run CLI with --verbose flag for more details.

@talaikis is this the error you are seeing? i am also seeing it on react-native 72.7

valn1 avatar Dec 01 '23 17:12 valn1

@talaikis is this the error you are seeing? i am also seeing it on react-native 72.7

Yeah, seems so.

talaikis avatar Dec 01 '23 17:12 talaikis

@talaikis do you happen to be declaring kotlin version in you build.gradle file? i was declaring it like kotlinVersion = '1.6.20' removing it and building again worked for me

valn1 avatar Dec 01 '23 19:12 valn1

@talaikis do you happen to be declaring kotlin version in you build.gradle file? i was declaring it like kotlinVersion = '1.6.20' removing it and building again worked for me

Doesn't help. Are you using Java 17? But I have set kotlin to 1.7.20 (default by the lib), now I'm getting cool error:

react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraProxy.kt:38:58 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type JavaScriptContextHolder?

talaikis avatar Dec 01 '23 21:12 talaikis

maybe try to update everything, it's what i did

valn1 avatar Dec 04 '23 11:12 valn1

@mrousavy Is supporting RN0.73 on the roadmap? Or would you recommend going with RN0.72 instead in order to get the package to build?

jeroenvanhattem avatar Dec 05 '23 17:12 jeroenvanhattem

Hey - not sure why you create a build error, and then don't include the build logs - but either way this does not help at all and that's why I'm closing it.

As of right now, RN 0.73 is not really tested since I didn't upgrade the Example app yet. I might upgrade this soon - for now maybe stay on RN 0.72 for a few more days until I added RN 0.73 support.

mrousavy avatar Dec 06 '23 14:12 mrousavy

Now, React Native 0.73 is stable, but after upgrading, I got these:

: file:///Users/raipiot/Code/soya-energy-app/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/CameraDevicesManager.kt:74:3 'hasConstants' overrides nothing
e: file:///Users/raipiot/Code/soya-energy-app/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraProxy.kt:38:58 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type JavaScriptContextHolder?

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.

recallwei avatar Dec 07 '23 03:12 recallwei

Stop pinging me. If something is urgent, pay me to do it. I don't have unlimited free time.

mrousavy avatar Dec 07 '23 15:12 mrousavy

Fixed in https://github.com/mrousavy/react-native-vision-camera/pull/2260 - if you appreciate my time and dedication, please consider sponsoring me on GitHub :)

mrousavy avatar Dec 07 '23 17:12 mrousavy