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

v2.13.1 introduced a big react-native version jump to 0.66.0+

Open DaAitch opened this issue 3 years ago • 12 comments
trafficstars

What were you trying to do?

using react-native: 0.63.3 and react-native-vision-camera: 2.13.1

I would consider this to be a bug, because I don't think it was the intention, that from v2.13.0 -> v2.13.1 an implicit dependency to react-native 0.66.0+ has been introduced.

It's because of https://github.com/mrousavy/react-native-vision-camera/commit/bea4aa8bb610fafb8b7f35d7f4d5bf396c5b752a#diff-3e7deaeac964bf6ea85aca1babe12c625dc8a26934c22b8d12f716875b58509fR65 using resolveView which was introduced in [email protected].

Another thing which would be cool, is to add a react-native min version to the docs.

Reproduceable Code

# compilation failed
react-native: 0.63.3
react-native-vision-camera: 2.13.1

# good
react-native: 0.63.3
react-native-vision-camera: 2.13.0

What happened instead?

compile error

Relevant log output

node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorRuntimeManager.kt: (65, 76): Unresolved reference: resolveView

Device

not important

VisionCamera Version

2.13.1

Additional information

DaAitch avatar Mar 31 '22 10:03 DaAitch

This issue happening to me too

meidikawardana avatar Apr 01 '22 00:04 meidikawardana

Same here, with react native 64.3

# compilation failed
react-native: v0.64.3
react-native-vision-camera: v2.13.1

# good
react-native: v0.64.3
react-native-vision-camera: v2.13.0

felansu avatar Apr 01 '22 09:04 felansu

Same thing here. Any solution?

IagoR0cha avatar Apr 04 '22 14:04 IagoR0cha

If it's not clear enough:

=> simply downgrade to react-native-vision-camera: 2.13.0, which is the second last release.

DaAitch avatar Apr 04 '22 20:04 DaAitch

wow took me hours to figure out that just downgrading makes those naughty compileKotlin thingy errors go away, I'm on RN 0.64.3 and don't use Kotlin anywhere, at least in my /android dir..

CanRau avatar Apr 05 '22 03:04 CanRau

Same issue "react-native-vision-camera": "^2.13.1", "react-native": "^0.64.3"

Tried also 2.13.0 and is working.

wilav-dev avatar Apr 06 '22 18:04 wilav-dev

v2.3.1 only supports 0.67+, you need to downgrade to v2.3.0.

alantoa avatar Apr 18 '22 18:04 alantoa

I would bump such breaking changes to version 3 instead of 2.3.1

hirbod avatar Apr 26 '22 12:04 hirbod

Worked for me, thanks @alantoa I think this should be in the readme 😄

iKronyck avatar Jun 10 '22 22:06 iKronyck

After downgrade to "react-native": "0.64.3" (also I try with "react-native": "0.67.0") "react-native-vision-camera": "2.13.0"

drop node_modules npm i --legacy-peer-deps

Problem still the same:

Task :react-native-vision-camera:compileDebugKotlin FAILED w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath: /Users/sdelky/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.5.30/5fd47535cc85f9e24996f939c2de6583991481b0/kotlin-stdlib-jdk8-1.5.30.jar (version 1.5) /Users/sdelky/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.5.30/525f5a7fa6d7790a571c07dd24214ed2dda352fe/kotlin-stdlib-jdk7-1.5.30.jar (version 1.5) /Users/sdelky/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.10/b8af3fe6f1ca88526914929add63cf5e7c5049af/kotlin-stdlib-1.6.10.jar (version 1.6) /Users/sdelky/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.6.10/c118700e3a33c8a0d9adc920e9dec0831171925/kotlin-stdlib-common-1.6.10.jar (version 1.6) w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings.

See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings 241 actionable tasks: 11 executed, 230 up-to-date e: /Users/sdelky/WebstormProjects/inspector/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/CameraViewModule.kt: (193, 76): Unresolved reference: R e: /Users/sdelky/WebstormProjects/inspector/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/CameraViewModule.kt: (194, 55): Unresolved reference: CONTROL_ZOOM_RATIO_RANGE

andreydos avatar Jun 21 '22 08:06 andreydos

After downgrade to "react-native": "0.64.3" (also I try with "react-native": "0.67.0") "react-native-vision-camera": "2.13.0"

drop node_modules npm i --legacy-peer-deps

Problem still the same.......

Change the version of Java from 1.8 to 11 help me with this issue

andreydos avatar Jun 21 '22 19:06 andreydos

I wasted around 2 hours just because I was using version ^2.13.0 instead of 2.13.0... Switching to 2.13.0 worked like a charm though.

og-abdul-mateen avatar Jul 04 '22 20:07 og-abdul-mateen

2.13.0

nice, worked by setting the version to 2.13.0

paulopgss avatar Nov 18 '22 14:11 paulopgss