Ris*_*ogi 8 android kotlin firebase firebase-mlkit android-camerax
我正在尝试使用Firebase ML套件扫描二维码,但无法在 android Pie(诺基亚 6.1 Plus)上启动相机。但是,相同的代码可以正常工作Android Oreo Redmi 6 A
这是我的毕业证书:
implementation "com.google.firebase:firebase-ml-vision:21.0.0"
implementation "androidx.camera:camera-core:1.0.0-alpha05"
implementation "androidx.camera:camera-camera2:1.0.0-alpha05"
Run Code Online (Sandbox Code Playgroud)
我已经在 Manifest 中提供了所有必需的权限和相机功能
这是我如何使用 Camera X 代码:
val previewConfig = PreviewConfig.Builder()
.setLensFacing(CameraX.LensFacing.BACK)
.build()
val preview = Preview(previewConfig)
preview.setOnPreviewOutputUpdateListener { previewOutput ->
textureView.surfaceTexture = previewOutput.surfaceTexture
}
val imageAnalysisConfig = ImageAnalysisConfig.Builder()
.build()
val imageAnalysis = ImageAnalysis(imageAnalysisConfig)
Run Code Online (Sandbox Code Playgroud)
日志猫:
E/libc: Access denied finding property "vendor.camera.aux.packagelist"
W/com.zup.cash: type=1400 audit(0.0:17168): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=18547 scontext=u:r:untrusted_app:s0:c130,c258,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
E/GLConsumer: [SurfaceTexture-0-7457-1] updateAndRelease: GLConsumer is not attached to an OpenGL ES context
D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=QRScanner, firebase_previous_id(_pi)=-1919220789441294810, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-1919220789441294811}]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
878 次 |
| 最近记录: |