环境
引擎: Unity 5.3.6f1
SDK: Vuforia 6.0.112
测试系统:Android 4.2/4.3 6.0
Android 6出错
在Android 6下Vuforia打印的日志是相机初始化正常,但有系统的error日志打印
01-03 19:22:02.322: E/AR(7796): CameraDevice::getCameraCalibration(): Failed to get camera calibration because the camera is not initialized. 01-03 19:22:02.892: E/CameraService(493): companion_disable property set to enable 01-03 19:22:02.902: E/Parcel(493): Reading a NULL string not supported here. 01-03 19:22:02.902: E/SecCameraCoreManager(493): initialize1 01-03 19:22:02.912: E/mm-camera-isp2(536): isp_module_start_session:142 session id 3 01-03 19:22:02.912: E/mm-camera(536): stats_module_start_session: E, kur sessionid=3, module=0xb66ffb20 01-03 19:22:02.912: E/mm-camera(536): aec_module_start_session E kur module 0xb66ffbe0 sessionid=196608 01-03 19:22:02.922: E/AEC_PORT(536): aec_port_init kur aec should be initialized 01-03 19:22:02.922: E/mm-camera(536): stats_port_init: E 01-03 19:22:02.922: E/mm-camera(536): stats_port_init: X 01-03 19:22:02.922: E/mm-camera-isp2(536): isp_trigger_thread_func:178 isp_new_thread trigger thread start
表现如下,相机拍摄的画面无法呈现出来,有个对角线分隔。
解决办法
方法一:升级Vuforia 到目前的最新版 6.2.6 (解决)
方法二:修改AndroidManifest.xml的targetSdkVersion为23(Android 6) (未测试)
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23" />