您的设备似乎不支持相机 [英] It seems that your device does not support camera
问题描述
我遇到了一个错误,我猜这在OpenCV应用程序中很常见.当我尝试运行该应用程序时,它显示您的设备似乎不支持相机(或它已锁定)".我已经看到此和此而且我已经做了他们所说的一切,例如授予相机许可和重新启动设备等.但是问题仍然存在.我知道这个问题意味着任何其他应用程序都必须使用相机,因此它已被锁定.当我清除所有使用相机的应用程序的缓存(可能是我使用相机的缓存)时,它只能工作一次.之后,同样的问题.这个问题有解决办法吗?
I have come across an error which I guess is very common in OpenCV apps. When I try to run the app, it says "it seems that your device does not support camera(or it is locked)". I have seen this and this and I have already done whatever they have said, like granting camera permission and rebooting the device etc. But still problem persists. I know this problem means that any other app must be using camera and hence it is locked. When I clear the cache of all the apps using camera which might me using camera, then it works but just once. After that same issue. Any solution to this problem?
谢谢.
推荐答案
我刚遇到了Android版OpenCV的相同问题,发现转到手机的 设置 -> 应用 (或类似)-> 您的应用 -> 权限 并启用Camera
权限似乎可以解决问题.
I have just run into the same problem with OpenCV for Android, and found that going to the phone's Settings -> Apps (or similar) -> Your app -> Permissions and enabling the Camera
permission seems to solve the problem.
希望这会有所帮助.
更新
如@ F43nd1r在下面的注释中所述,不应对您自己的应用执行要求用户在应用设置菜单中更新其权限的操作.根据 https://developer.android.com/training/permissions/requesting.html .
As noted by @F43nd1r in the comments below, asking the user to update their permissions in the app settings menu should not be done for your own apps. What should be done is to ask the user for permission to access the camera/whatever, as per https://developer.android.com/training/permissions/requesting.html.
这篇关于您的设备似乎不支持相机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!