-
-
Notifications
You must be signed in to change notification settings - Fork 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
Black screen in the cameraView🐛 #1191
Comments
hmm, this looks like a CameraX error (on google's side) |
first time the app camera running or not? |
@mrousavy yeah I think it's CameraX error too since the app build successful without any errors or warnings, this error happened twice but I can't reproduce it. |
I still have the problem error on 2.14 but without any error |
For anyone still having this problem, try adding Camera Core and Camera 2 from the CameraX package to your
|
Did this work for anyone? The problem persists for me |
Currently having this issue as well |
android:hardwareAccelerated="�false" in AndroidManifest.xml makes the camera no longer display. Check your AndroidManifest and set it back to true may help the camera work again. |
Use useIsFocused if you are using @react-navigation import { useIsFocused } from '@react-navigation/native';
export const CameraView = (props) => {
const isFocused = useIsFocused();
return (
<View>
{ isFocused && <Camera /> }
</View>
)
} |
Hey! I've rewritten the entire Android codebase of VisionCamera from CameraX to Camera2 in the efforts of ✨ VisionCamera V3. I just now completed the Camera2 rewrite and I believe the core structure is running, but there might be some edge cases to iron out. Can you try and test the PR #1674 for me to see if you can still reproduce this issue here? Here's an instruction on how you can test that: #1674 (comment) If the issue cannot be reproduced with that version/PR anymore, then hoorayy, I fixed it! 🎉 Thank you! |
What were you trying to do?
I want to make a Frame Processor Plugin, I followed the steps on the web site https://mrousavy.com/react-native-vision-camera/docs/guides/frame-processors-plugins-final/.Then, I launched the project without using the plugin I created and I got a black screen in the camera view. When I checked in the logcat I found this error:
Failed to configure session: abstract method "androidx.camera.core.impl.Config androidx.camera.core.impl.UseCaseConfigFactory.getConfig(androidx.camera.core.impl.UseCaseConfigFactory$CaptureType, int)"
System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
Memory: 1.01 GB / 7.86 GB
Binaries:
Node: 14.17.3 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 6.14.13 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
Android NDK: 22.1.7171670
Windows SDK: Not Found
IDEs:
Android Studio: AI-212.5712.43.2112.8609683
Visual Studio: 17.2.32616.157 (Visual Studio Community 2022)
Languages:
Java: 17.0.2 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found
Reproduceable Code
What happened instead?
the app build successful but I got a black screen instead of camera
Relevant log output
Device
Samsung galaxy m13
VisionCamera Version
2.14.1
Additional information
The text was updated successfully, but these errors were encountered: