-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Task :react-native-vision-camera:compileDebugKotlin FAILED on React Native 0.74.X Android Platform #2851
Comments
0.74 is not supported yet AFAIK. |
A simple workaround using patch-package: react-native-vision-camera+4.0.3.patch diff --git a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt
index d697bef..3e149f1 100644
--- a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt
+++ b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt
@@ -13,6 +13,7 @@ import com.mrousavy.camera.core.ViewNotFoundError
import com.mrousavy.camera.react.CameraView
import java.lang.ref.WeakReference
+@OptIn(FrameworkAPI::class)
@Suppress("KotlinJniMissingFunction") // we use fbjni.
class VisionCameraProxy(private val reactContext: ReactApplicationContext) {
companion object { It's not a definitive solution, it just a workaround to able to compile this on react-native 74 |
@danieloprado the patch does not include the --- a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt
+++ b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt
@@ -7,12 +7,14 @@ import com.facebook.jni.HybridData
import com.facebook.proguard.annotations.DoNotStrip
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.UiThreadUtil
+import com.facebook.react.common.annotations.FrameworkAPI
import com.facebook.react.turbomodule.core.CallInvokerHolderImpl
import com.facebook.react.uimanager.UIManagerHelper
import com.mrousavy.camera.core.ViewNotFoundError
import com.mrousavy.camera.react.CameraView
import java.lang.ref.WeakReference
+@OptIn(FrameworkAPI::class)
@Suppress("KotlinJniMissingFunction") // we use fbjni.
class VisionCameraProxy(private val reactContext: ReactApplicationContext) {
companion object { |
Actually should be: diff --git a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt
index d697bef..8de418b 100644
--- a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt
+++ b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt
@@ -7,12 +7,14 @@ import com.facebook.jni.HybridData
import com.facebook.proguard.annotations.DoNotStrip
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.UiThreadUtil
+import com.facebook.react.common.annotations.FrameworkAPI
import com.facebook.react.turbomodule.core.CallInvokerHolderImpl
import com.facebook.react.uimanager.UIManagerHelper
import com.mrousavy.camera.core.ViewNotFoundError
import com.mrousavy.camera.react.CameraView
import java.lang.ref.WeakReference
+@OptIn(FrameworkAPI::class)
@Suppress("KotlinJniMissingFunction") // we use fbjni.
class VisionCameraProxy(private val reactContext: ReactApplicationContext) {
companion object {
Need to add the first lines |
oops, failed copy paste :face_palm:, thanks @danieloprado |
Hey - this is a duplicate of #2614. New architecture support (which also implies react-native 0.74 support) is tracked in that issue. If you need this, please sponsor the issue/fund the development of that major refactor/migration by donating to the Polar pool mentioned in the issue above. Thank you. |
Good afternoon, how can I implement this solution that you mention? |
Create a file at patches/react-native-vision-camera+4.0.3.patch, then install patch-package |
Hi, im facing this issue cuz some library broke our project (we dont know which one) and we're forced to update RN :S Using yarn patch im getting this error, does anyone knows why?
Im running
Then open the temporary folder and making the changes
and finally
|
If you using Expo SDK51 Solution: Change to Expo SDK50 (react-native 0.73)
|
How can I revert to sdk50 on my iOS device, the latest version is what on app store |
Thanks bro. It worked for me |
for react-native 0.74.1 it's worked for me |
Will this fix be included in the next patch release (at least) |
I already have these two lines in this file but still getting same error. I'm using latest version 4.5.2 |
I am also facing this issue. |
What's happening?
When install
react-native-vision-camera
to a React Native 0.74.X project, it will throw theTask :react-native-vision-camera:compileDebugKotlin FAILED
error during compilation for Android. Tested both V3 and V4 ofreact-native-vision-camera
module both have the same error.However, if I using React Native 0.73.X then there will be no issue at all.
Screen Capture On Android Studio with RN 0.74.1
Reproduceable Code
Relevant log output
Camera Device
NA
Device
Android Pixel Simulator
VisionCamera Version
4.0.2
Can you reproduce this issue in the VisionCamera Example app?
No, I cannot reproduce the issue in the Example app
Additional information
The text was updated successfully, but these errors were encountered: