Mi5'您的设备似乎不支持相机(或已锁定)应用程序将关闭'问题

时间:2016-07-08 06:29:03

标签: android opencv camera

我试图在mi 5上运行一个简单的摄像头OpenCV。我安装了OpenCV_2.4.3_Manager_2.0_armeabi.apk但显示的是我的手机屏幕'您的设备似乎不支持摄像头(或者它已被锁定) 。申请将被关闭'在打开应用程序时。如何解决这个问题?

2 个答案:

答案 0 :(得分:1)

Android 6.0 has introduced a new permission model. Application has to request the user for granting some permissions manually, declaration in Manifest is not enough.

More info here: https://developer.android.com/training/permissions/requesting.html

Going to: Settings -> Apps -> Your app -> Permissions and enabling the Camera permission

should also work, but might not be too elegant solution

答案 1 :(得分:0)

签入您的清单:

<uses-permission android:name="android.permission.CAMERA"/>

<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera.autofocus"/>
<uses-feature android:name="android.hardware.camera.front"/>
<uses-feature android:name="android.hardware.camera.front.autofocus"/>

或者,检查您的设备

  

设置 - &gt;应用 - &gt;你的应用 - &gt;权限和启用“相机”权限

或,

  

杀死使用相机的任何其他应用。

如果那些不起作用!您的设备不支持openCV,并非所有设备都支持它!