-
-
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
🔧 This API is provided only for React Native frameworks and not intended for general users. This API can change between minor versions in alignment with React Native frameworks and won't be considered a breaking change. #2904
Comments
Same here with react-native-vision-camera v4.0.5 and RN 0.74.0 |
yes, so confused , dont know how to solve that |
Try downgrading the RN version to 0.73 |
but my rn version is 0.71.11, meet same issue, do you konw how to fix it |
why "react-native-vision-camera": "^3.3.1" use two versions of react-native ?
|
here is my gradle version and kotlin version
|
First, let's analyze the issue. Although your react-native version in This is because, before react-native-vision-camera v3.3.1, the android/build.gradle module in the project used the following syntax:
This line means that when building the camera package, if you don't explicitly specify the react-android version in the build.gradle file of your react-native project, Gradle will download the latest version 0.74.1 from the Maven repository at https://mvnrepository.com/artifact/com.facebook.react/react-android. This is the reason for the bug. The solution is to use the "force" keyword to enforce the use of react-android version 0.71.11:
However, sometimes the problem may not be resolved with just this step. If you are maintaining an older project that uses both react-native-vision-camera and other react-native libraries like react-native-webview, you may encounter "duplicate class" issues. For example:
If your project has a similar situation, it will be difficult to compile because although your project references react-native and react-android, which seem unrelated, they actually have the same package names and class names. Hence, the compiler will fail. To solve this problem, you need to change all occurrences of implementation Usually, we don't need to manually adjust the build.gradle file of each package. We can add the following code at the end of the android/build.gradle file in the root directory:
This code will change all occurrences of implementation |
thanks , it works for me, you save me life |
VisionCamera does not support RN 0.74 yet. See this issue for updates: #2614 and consider sponsoring if you need this sooner. |
How were you trying to build the app?
i am trying to build android, i am not use camera v4 , but i still meet same this error. this error confuse me a lot of time , who can save my life.
this is error
i use camera v3
here is my computer env
Full build logs
Project dependencies
VisionCamera Version
react-native-vision-camera@^3.3.1: version "3.9.2"
Target platforms
Android
Operating system
MacOS
Can you build the VisionCamera Example app?
Yes, I can successfully build the Example app here
Additional information
The text was updated successfully, but these errors were encountered: