react-native-vision-camera
react-native-vision-camera copied to clipboard
v2.13.1 introduced a big react-native version jump to 0.66.0+
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
- [ ] I am using Expo
- [X] I have read the Troubleshooting Guide
- [X] I agree to follow this project's Code of Conduct
- [X] I searched for similar issues in this repository and found none.
This issue happening to me too
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
Same thing here. Any solution?
If it's not clear enough:
=> simply downgrade to react-native-vision-camera: 2.13.0, which is the second last release.
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..
Same issue "react-native-vision-camera": "^2.13.1", "react-native": "^0.64.3"
Tried also 2.13.0 and is working.
v2.3.1 only supports 0.67+, you need to downgrade to v2.3.0.
I would bump such breaking changes to version 3 instead of 2.3.1
Worked for me, thanks @alantoa I think this should be in the readme 😄
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
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
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.
2.13.0
nice, worked by setting the version to 2.13.0