react-native-vision-camera
react-native-vision-camera copied to clipboard
🐛 Task :react-native-vision-camera:compileDebugKotlin FAILED
What were you trying to do?
I am trying to install this library
Reproduceable Code
No response
What happened instead?
Build fails at this step: > Task :react-native-vision-camera:compileDebugKotlin FAILED
Relevant log output
> 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:
user/.gradle/caches/transforms-2/files-2.1/664f78d5defbcdceed6cc6b91334957c/jetified-kotlin-stdlib-jdk8-1.5.30.jar (version 1.5)
user/.gradle/caches/transforms-2/files-2.1/98f292b47b7ae2a67fdb09d889c153dc/jetified-kotlin-stdlib-jdk7-1.5.30.jar (version 1.5)
user/.gradle/caches/transforms-2/files-2.1/2482ed84b3d2e1c78620a60749fa204b/jetified-kotlin-stdlib-1.6.10.jar (version 1.6)
user/.gradle/caches/transforms-2/files-2.1/a1dc49042920562f5109600bb5b5b2b0/jetified-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.7.1/userguide/command_line_interface.html#sec:command_line_warnings
581 actionable tasks: 8 executed, 573 up-to-date
e: \node_modules\react-native-vision-camera\android\src\main\java\com\mrousavy\camera\frameprocessor\FrameProcessorRuntimeManager.kt: (65, 76): Unresolved reference: resolveView
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-vision-camera:compileDebugKotlin'.
> 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 47s
Device
Xiaomi mi A2 lite (real device)
VisionCamera Version
2.13.2
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.
I tried everything from A to Z found on internet (searching for almost 30 hours). Hope there is some solution :|
Hi, you didn't post an error message. Only warnings from the log are here (w:
).
Please post full output.
how is this only warning
Please tell me, what type of log can I give you additionally?
Downgrading to 2.13.0 fixed it for me. I don't know why.
If it is related to the RN version, I think it should be mentioned in the docs
I am using RN 0.64.1
Ah my bad I just didn't see the error correctly. You're right, this is available only on newer RN versions
I have this problem too, do we have any updates?
See my comment above about downgrade
This might be related to #957.
The downgrade did not work here.
"react-native": "0.63.2" "react-native-vision-camera": "2.13.0"
The downgrade did not work here.
"react-native": "0.63.2" "react-native-vision-camera": "2.13.0"
Same here.. Downgrade is also not working for me. I had installed version "2.11.2" After changing and tried with version "2.13.2", "2.13.1" & "2.13.2" facing above error.
And even after changed to old version i.e. "2.11.2", node_modules packages are updated so that error show continue while building Android code.
Try to run gradlew clean and delete node modules. Also if you have old expo unimodules installation, try to migrate to new expo modules
Also please post screenshot from android studio, what went wrong exactly
Try to run gradlew clean and delete node modules. Also if you have old expo unimodules installation, try to migrate to new expo modules
Yes, did all of above.
- Android Clean gradle
- Rebuild gradle
- Remove all node packages and install from scratch
- Android studio Invalidate cache & Restart
But even after all these, got this error
But error you posted can't happen in case of 2.13.0. You are trying to install 2.13.2 right?
I had exact same error and resolved by downgrading to 2.13.0
But error you posted can't happen in case of 2.13.0. You are trying to install 2.13.2 right?
No, I tested with version 2.13.0
I had exact same error and resolved by downgrading to 2.13.0
Yes I saw your post and solution you gave. And I also tried to implement it and after all that trial and error I got this result with all versions. Only working version is 2.11.2 and that is also with old node packages. Otherwise no luck :(
But simply v2.13.0 does not have the code you are showing on screenshot of error
You mean to say, the file I am getting an error called FrameProcessorRuntimeManage.kt
is not included in v2.13.0?
Yes. You are somehow installing latest version instead of 2.13.0
Here is the link to source of that file from v2.13.0 https://github.com/mrousavy/react-native-vision-camera/blob/65d4d46f6ab4e04dca15c15b8cf9c07a17f97d72/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorRuntimeManager.kt
Just delete node_modules, edit lib version in package.json to 2.13.0, run yarn or npm, run gradlew clean and thats it
That is a RN version error, are you on 0.67?
Same problem. Have any suggestions??
Same problem. Have any suggestions??
In my case below solutions is working..
- Remove all node files
-
npm i
- Try to install with particular version like..
npm i [email protected]
Downgrading to 2.13.0
works fine for both android and iOS but some features like zoom and auto light adjustment wont work on iOS which are actually available in 2.13.3
Downgrading to version 2.13.0 works fine.
+1
Facing same failed condition!
Tried lower versions but that didn't help.
Android React Native: 0.61.5 Vision Camera: 2.14.1
Facing same failed condition!
Tried lower versions but that didn't help.
Android React Native: 0.61.5 Vision Camera: 2.14.1
May be you should try to upgrade React Native version