Open liwenz opened 1 year ago
Hey, sorry I do not know what is wrong on your end. Do you run it on a real or virtual device ? When I do a project wide search, I only find the string "2.2.0" (line 73 of /app/gradle.build) , but no occurrence of "2.4.0" so I do not even know where you could get that. How about you ?
I just cleaned up and simplified the project. Now is a good time to re fetch to project to try again.
Here is my exact config, (known to work) :
Android Studio Giraffe | 2022.3.1 Patch 1 Build #AI-223.8836.35.2231.10671973, built on August 17, 2023 Runtime version: 17.0.6+0-b2043.56-10027231 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 2020M Cores: 4 Registry: external.system.auto.import.disabled=true ide.text.editor.with.preview.show.floating.toolbar=false
I update to this version. it could run ,but not photo ,and 2 second, it exit
Can you share your device brand and model, along with the logs of the crash ?
umidigi G3 Max to answer your question, I try Huawei Mate 10, it work well. At least, it could display video. I try to connect obs, but I forget the way. I hope you know some design idea and could change to camera X
cameraX is built on top of camera2, it would not work any better. In the readme you can find some OBS setting to receive the stream. You can also look at the script remoteCamClient.sh
for a working ffmpeg command.
2023-08-24 23:19:07.215 30451-30462 System com.samsung.android.scan3d W A resource failed to call Surface.release.
2023-08-24 23:19:20.654 30509-30509 ziparchive com.samsung.android.scan3d W Unable to open '/data/app/~~SrT_IS7elBL5PIKFaG9tUQ==/com.samsung.android.scan3d-afAvwe_o5NaaujyqcGxSBQ==/base.dm': No such file or directory
2023-08-24 23:19:20.654 30509-30509 ziparchive com.samsung.android.scan3d W Unable to open '/data/app/~~SrT_IS7elBL5PIKFaG9tUQ==/com.samsung.android.scan3d-afAvwe_o5NaaujyqcGxSBQ==/base.dm': No such file or directory
2023-08-24 23:19:20.823 30509-30509 nativeloader com.samsung.android.scan3d D Configuring classloader-namespace for other apk /data/app/SrT_IS7elBL5PIKFaG9tUQ==/com.samsung.android.scan3d-afAvwe_o5NaaujyqcGxSBQ==/base.apk. target_sdk_version=33, uses_libraries=, library_path=/data/app/SrT_IS7elBL5PIKFaG9tUQ==/com.samsung.android.scan3d-afAvwe_o5NaaujyqcGxSBQ==/lib/arm64, permitted_path=/data:/mnt/expand:/data/user/0/com.samsung.android.scan3d
2023-08-24 23:19:20.838 30509-30509 GraphicsEnvironment com.samsung.android.scan3d V ANGLE Developer option for 'com.samsung.android.scan3d' set to: 'default'
2023-08-24 23:19:20.839 30509-30509 GraphicsEnvironment com.samsung.android.scan3d V ANGLE GameManagerService for com.samsung.android.scan3d: false
2023-08-24 23:19:20.839 30509-30509 GraphicsEnvironment com.samsung.android.scan3d V Neither updatable production driver nor prerelease driver is supported.
2023-08-24 23:19:20.845 30509-30509 NetworkSecurityConfig com.samsung.android.scan3d D No Network Security Config specified, using platform default
2023-08-24 23:19:20.845 30509-30509 NetworkSecurityConfig com.samsung.android.scan3d D No Network Security Config specified, using platform default
2023-08-24 23:19:20.921 30509-30509 CAMERAACTIVITY com.samsung.android.scan3d I CAMERAACTIVITY onCreate
2023-08-24 23:19:20.970 30509-30509 .android.scan3d com.samsung.android.scan3d W Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
2023-08-24 23:19:20.970 30509-30509 .android.scan3d com.samsung.android.scan3d W Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
2023-08-24 23:19:21.033 30509-30509 Compatibil...geReporter com.samsung.android.scan3d D Compat change id reported: 171228096; UID 10192; state: ENABLED
2023-08-24 23:19:21.038 30509-30509 Compatibil...geReporter com.samsung.android.scan3d D Compat change id reported: 210923482; UID 10192; state: ENABLED
2023-08-24 23:19:21.107 30509-30509 onViewCreated com.samsung.android.scan3d I onViewCreated
2023-08-24 23:19:21.111 30509-30509 CAMMM com.samsung.android.scan3d I fragmentCameraBinding.buttonKill androidx.appcompat.widget.AppCompatButton{504c471 VFED..C.. ......I. 0,0-0,0 #7f080048 app:id/buttonKill}
2023-08-24 23:19:21.125 30509-30509 onResume com.samsung.android.scan3d I onResume
2023-08-24 23:19:21.158 30509-30509 AUTOFIT com.samsung.android.scan3d I Measured dimensions set: 1080 x 2336
2023-08-24 23:19:21.170 30509-30509 AUTOFIT com.samsung.android.scan3d I Measured dimensions set: 1080 x 1168
2023-08-24 23:19:21.183 30509-30509 VRI[CameraActivity] com.samsung.android.scan3d D performTraversals relayoutWindow: maybeSyncSeqId=-1 ,mSyncSeqId=0 ,relayoutResult=3
2023-08-24 23:19:21.187 30509-30509 AUTOFIT com.samsung.android.scan3d I Measured dimensions set: 1080 x 2336
2023-08-24 23:19:21.192 30509-30509 AUTOFIT com.samsung.android.scan3d I Measured dimensions set: 1080 x 1168
2023-08-24 23:19:21.213 30509-30509 SurfaceSyncer com.samsung.android.scan3d E Failed to find sync for id=0
2023-08-24 23:19:21.228 30509-30529 mali_gralloc com.samsung.android.scan3d I register: id=0x278000009e2, importpid=-1
2023-08-24 23:19:21.260 30509-30529 Parcel com.samsung.android.scan3d W Expecting binder but got null!
2023-08-24 23:19:21.265 30509-30509 CAM com.samsung.android.scan3d I onStartCommand start
2023-08-24 23:19:21.271 30509-30509 Compatibil...geReporter com.samsung.android.scan3d D Compat change id reported: 160794467; UID 10192; state: ENABLED
2023-08-24 23:19:21.299 30509-30509 System.err com.samsung.android.scan3d W SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
2023-08-24 23:19:21.299 30509-30509 System.err com.samsung.android.scan3d W SLF4J: Defaulting to no-operation (NOP) logger implementation
2023-08-24 23:19:21.299 30509-30509 System.err com.samsung.android.scan3d W SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2023-08-24 23:19:21.478 30509-30509 .android.scan3d com.samsung.android.scan3d W Accessing hidden method Lsun/misc/VM;->maxDirectMemory()J (unsupported, reflection, allowed)
2023-08-24 23:19:21.480 30509-30509 PlatformDependent com.samsung.android.scan3d I Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
2023-08-24 23:19:21.482 30509-30509 .android.scan3d com.samsung.android.scan3d E No implementation found for int io.netty.channel.kqueue.Native.sizeofKEvent() (tried Java_io_netty_channel_kqueue_Native_sizeofKEvent and Java_io_netty_channel_kqueue_Native_sizeofKEvent)
2023-08-24 23:19:21.486 30509-30509 .android.scan3d com.samsung.android.scan3d E No implementation found for int io.netty.channel.epoll.Native.offsetofEpollData() (tried Java_io_netty_channel_epoll_Native_offsetofEpollData and Java_io_netty_channel_epoll_Native_offsetofEpollData)
2023-08-24 23:19:21.523 30509-30509 .android.scan3d com.samsung.android.scan3d W Accessing hidden field Lsun/nio/ch/SelectorImpl;->selectedKeys:Ljava/util/Set; (unsupported, reflection, allowed)
2023-08-24 23:19:21.523 30509-30509 .android.scan3d com.samsung.android.scan3d W Accessing hidden field Lsun/nio/ch/SelectorImpl;->publicSelectedKeys:Ljava/util/Set; (unsupported, reflection, allowed)
2023-08-24 23:19:21.552 30509-30509 TrafficStats com.samsung.android.scan3d D tagSocket(148) with statsTag=0xffffffff, statsUid=-1
2023-08-24 23:19:21.556 30509-30509 .android.scan3d com.samsung.android.scan3d W type=1400 audit(0.0:1855): avc: denied { read } for name="somaxconn" dev="proc" ino=4077616 scontext=u:r:untrusted_app:s0:c192,c256,c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file permissive=0 app=com.samsung.android.scan3d
2023-08-24 23:19:21.561 30509-30509 Compatibil...geReporter com.samsung.android.scan3d D Compat change id reported: 170188668; UID 10192; state: ENABLED
2023-08-24 23:19:21.564 30509-30509 MacAddressUtil com.samsung.android.scan3d W Failed to find a usable hardware address from the network interfaces; using random bytes: 57:fd:5a:e2:11:d6:ea:32
2023-08-24 23:19:21.598 30509-30509 CAM com.samsung.android.scan3d I onStartCommand start_camera_engine
2023-08-24 23:19:21.607 30509-30509 CameraManagerGlobal com.samsung.android.scan3d I Connecting to camera service
2023-08-24 23:19:21.653 30509-30509 SELECTOR com.samsung.android.scan3d I id: 0
2023-08-24 23:19:21.654 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.654 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.654 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.654 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.662 30509-30509 SELECTOR com.samsung.android.scan3d I id: 1
2023-08-24 23:19:21.663 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.663 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.663 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.663 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.667 30509-30509 SELECTOR com.samsung.android.scan3d I id: 2
2023-08-24 23:19:21.671 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.671 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.671 30509-30509 CAP com.samsung.android.scan3d I MONOCHROME
2023-08-24 23:19:21.674 30509-30509 SELECTOR com.samsung.android.scan3d I id: 17
2023-08-24 23:19:21.675 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.675 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.675 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.676 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.679 30509-30509 SELECTOR com.samsung.android.scan3d I id: 21
2023-08-24 23:19:21.680 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.680 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.680 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.680 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.685 30509-30509 SELECTOR com.samsung.android.scan3d I id: 23
2023-08-24 23:19:21.687 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.687 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.687 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.687 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.693 30509-30509 SELECTOR com.samsung.android.scan3d I id: 30
2023-08-24 23:19:21.695 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.695 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.695 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.695 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.699 30509-30509 SELECTOR com.samsung.android.scan3d I id: 31
2023-08-24 23:19:21.701 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.701 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.701 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.701 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.705 30509-30509 SELECTOR com.samsung.android.scan3d I id: 32
2023-08-24 23:19:21.708 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.708 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.708 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.708 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.711 30509-30509 SELECTOR com.samsung.android.scan3d I id: 33
2023-08-24 23:19:21.713 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.713 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.713 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.713 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.717 30509-30509 SELECTOR com.samsung.android.scan3d I id: 36
2023-08-24 23:19:21.718 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.718 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.718 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.718 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.722 30509-30509 SELECTOR com.samsung.android.scan3d I id: 37
2023-08-24 23:19:21.724 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.724 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.724 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.724 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.726 30509-30509 SELECTOR com.samsung.android.scan3d I id: 38
2023-08-24 23:19:21.729 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.729 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.729 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.729 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.731 30509-30509 SELECTOR com.samsung.android.scan3d I id: 39
2023-08-24 23:19:21.733 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.733 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.733 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.733 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.735 30509-30509 SELECTOR com.samsung.android.scan3d I id: 42
2023-08-24 23:19:21.738 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.738 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.738 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.738 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.741 30509-30509 SELECTOR com.samsung.android.scan3d I id: 46
2023-08-24 23:19:21.742 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.742 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.742 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.742 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.746 30509-30509 SELECTOR com.samsung.android.scan3d I id: 47
2023-08-24 23:19:21.747 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.747 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.747 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.747 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.751 30509-30509 SELECTOR com.samsung.android.scan3d I id: 48
2023-08-24 23:19:21.754 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.754 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.754 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.754 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.758 30509-30509 SELECTOR com.samsung.android.scan3d I id: 51
2023-08-24 23:19:21.759 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.759 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.759 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.759 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.763 30509-30509 SELECTOR com.samsung.android.scan3d I id: 54
2023-08-24 23:19:21.764 30509-30509 CAP com.samsung.android.scan3d I BACKWARD_COMPATIBLE
2023-08-24 23:19:21.764 30509-30509 CAP com.samsung.android.scan3d I BURST_CAPTURE
2023-08-24 23:19:21.764 30509-30509 CAP com.samsung.android.scan3d I CONSTRAINED_HIGH_SPEED_VIDEO
2023-08-24 23:19:21.764 30509-30509 CAP com.samsung.android.scan3d I READ_SENSOR_SETTINGS
2023-08-24 23:19:21.774 30509-30509 CAMERA com.samsung.android.scan3d I initializeCamera
2023-08-24 23:19:22.493 30509-30525 mali_gralloc com.samsung.android.scan3d I register: id=0x278000009e5, importpid=-1
2023-08-24 23:19:22.495 30509-30509 CAM com.samsung.android.scan3d I onStartCommand onResume
2023-08-24 23:19:22.496 30509-30509 Choreographer com.samsung.android.scan3d I Skipped 81 frames! The application may be doing too much work on its main thread.
2023-08-24 23:19:22.499 30509-30509 AUTOFIT com.samsung.android.scan3d I Measured dimensions set: 1080 x 2336
2023-08-24 23:19:22.499 30509-30509 AutoFitSurfaceView com.samsung.android.scan3d I Measured dimensions set: 1080 x 1920
2023-08-24 23:19:22.500 30509-30509 AUTOFIT com.samsung.android.scan3d I Measured dimensions set: 1080 x 1168
2023-08-24 23:19:22.500 30509-30509 AutoFitSurfaceView com.samsung.android.scan3d I Measured dimensions set: 656 x 1168
2023-08-24 23:19:22.511 30509-30529 mali_gralloc com.samsung.android.scan3d I register: id=0x278000009e6, importpid=-1
2023-08-24 23:19:22.516 30509-30509 CAM com.samsung.android.scan3d I onStartCommand new_preview_surface
2023-08-24 23:19:22.517 30509-30509 CAMERA com.samsung.android.scan3d I initializeCamera
2023-08-24 23:19:22.517 30509-30509 CAMERA com.samsung.android.scan3d I close
2023-08-24 23:19:22.529 30509-30524 OpenGLRenderer com.samsung.android.scan3d I Davey! duration=1361ms; Flags=0, FrameTimelineVsyncId=1030371, IntendedVsync=174690119645435, Vsync=174691450029368, InputEventId=0, HandleInputStart=174691454551857, AnimationStart=174691454558511, PerformTraversalsStart=174691455806665, DrawStart=174691461782588, FrameDeadline=174690152463371, FrameInterval=174691454304896, FrameStartTime=16424493, SyncQueued=174691465100972, SyncStart=174691465558396, IssueDrawCommandsStart=174691466133896, SwapBuffers=174691477003165, FrameCompleted=174691481969819, DequeueBufferDuration=3477539, QueueBufferDuration=663770, GpuCompleted=174691481969819, SwapBuffersCompleted=174691478307511, DisplayPresentTime=35192962085637, CommandSubmissionCompleted=174691477003165,
2023-08-24 23:19:29.466 30509-30509 mali_gralloc com.samsung.android.scan3d I unregister: id=0x278000009e5, base=0x0, importpid=30509
2023-08-24 23:19:29.470 30509-30509 AndroidRuntime com.samsung.android.scan3d D Shutting down VM
2023-08-24 23:19:29.472 30509-30509 AndroidRuntime com.samsung.android.scan3d E FATAL EXCEPTION: main
Process: com.samsung.android.scan3d, PID: 30509
java.lang.RuntimeException: Unable to start service com.samsung.android.scan3d.serv.Cam@ce63b87 with Intent { act=new_preview_surface cmp=com.samsung.android.scan3d/.serv.Cam (has extras) }: java.lang.IllegalArgumentException: getCameraCharacteristics:819: Unable to retrieve camera characteristics for unknown device 0: No such file or directory (-2)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4804)
at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2266)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:8061)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:703)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
Caused by: java.lang.IllegalArgumentException: getCameraCharacteristics:819: Unable to retrieve camera characteristics for unknown device 0: No such file or directory (-2)
at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1382)
at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:603)
at com.samsung.android.scan3d.serv.CamEngine.initializeCamera(CamEngine.kt:211)
at com.samsung.android.scan3d.serv.Cam$onStartCommand$2.invokeSuspend(Cam.kt:119)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKtBuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
at kotlinx.coroutines.BuildersKtBuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
at com.samsung.android.scan3d.serv.Cam.onStartCommand(Cam.kt:119)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4786)
at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2266)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:8061)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:703)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
Caused by: android.os.ServiceSpecificException: getCameraCharacteristics:819: Unable to retrieve camera characteristics for unknown device 0: No such file or directory (-2) (code 3)
at android.os.Parcel.createExceptionOrNull(Parcel.java:3031)
at android.os.Parcel.createException(Parcel.java:3001)
at android.os.Parcel.readException(Parcel.java:2984)
at android.os.Parcel.readException(Parcel.java:2926)
at android.hardware.ICameraService$Stub$Proxy.getCameraCharacteristics(ICameraService.java:754)
at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:582)
at com.samsung.android.scan3d.serv.CamEngine.initializeCamera(CamEngine.kt:211)
at com.samsung.android.scan3d.serv.Cam$onStartCommand$2.invokeSuspend(Cam.kt:119)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKtBuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
at kotlinx.coroutines.BuildersKtBuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
at com.samsung.android.scan3d.serv.Cam.onStartCommand(Cam.kt:119)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4786)
at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2266)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:8061)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:703)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
it could make project but when run, it shows: Duplicate class androidx.lifecycle.ViewModelLazy found in modules jetified-lifecycle-viewmodel-ktx-2.2.0-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0) and lifecycle-viewmodel-2.4.0-runtime (androidx.lifecycle:lifecycle-viewmodel:2.4.0) Duplicate class androidx.lifecycle.ViewModelProviderKt found in modules jetified-lifecycle-viewmodel-ktx-2.2.0-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0) and lifecycle-viewmodel-2.4.0-runtime (androidx.lifecycle:lifecycle-viewmodel:2.4.0)
Go to the documentation to learn how to Fix dependency resolution errors. Could you explain how to design it? I could run cameraXApp, https://github.com/liwenz/CameraXApp