hello i am currently developing an app named Clear Up where it is suppose to detect written text or text in the camera just like the google lens and this app is design to help people with dyslexia. so basically the text will be detected and then it will say the word using text to speech feature but i am no longer near there because i am stuck here in making a simple button that activates the camera.
after running the program in my phone it just doesnt work and i think its in my MainActivity.kt that is wrong because i noticed that when running my main_activity.xml it just says Hello Android when i did not configured the MainActivity.kt yet. just provide me the explanations and when i ask you to give me or revise the code just do what i tell you okay? because im sure its gonna crash this site when too much token. 

IMPORTANT!!
after running the app in my phone it keeps on stopping / crashing. heres the short logcat:
--------- beginning of main
2024-04-06 13:09:55.925  1138-1138  ccci_rpcd               ccci_rpcd                            E  Failed to read from RPC device (-1) !! errno = 4
2024-04-06 13:09:55.927  1420-1499  TRS                     ven...iatek.hardware.pq@2.2-service  D  ccorr table index=0
2024-04-06 13:09:55.927  1420-1499  TRS                     ven...iatek.hardware.pq@2.2-service  D  [PQ_SERVICE] setPQParamWithFilter configFlag: 1
2024-04-06 13:09:55.929  1621-1685  VoLTE IMSM              volte_imsm_93                        E  Interrupt happen Interrupted system call (4) (module/mdagent/volte_imsm_93/src/imsmmd.c:2952)
2024-04-06 13:09:55.929  1642-1693  VoLTE IMCB-CM           volte_imcb                           E  RECEIVE error code: EINTR, Need to retry #51
2024-04-06 13:09:55.949  1840-4058  BatteryStatsService     system_server                        I  In wakeup_callback: suspend aborted
2024-04-06 13:09:56.273 31422-4444  adbd                    adbd                                 W  timed out while waiting for FUNCTIONFS_BIND, trying again
2024-04-06 13:09:56.273 31422-4444  adbd                    adbd                                 I  UsbFfs: connection terminated: monitor thread finished
2024-04-06 13:09:56.274 31422-31422 adbd                    adbd                                 I  UsbFfs: already offline
2024-04-06 13:09:56.274 31422-31422 adbd                    adbd                                 I  destroying transport UsbFfs
2024-04-06 13:09:56.274 31422-31422 adbd                    adbd                                 I  UsbFfsConnection being destroyed
2024-04-06 13:09:56.307 31422-31429 adbd                    adbd                                 I  opening control endpoint /dev/usb-ffs/adb/ep0
2024-04-06 13:09:56.311 31422-31429 adbd                    adbd                                 I  UsbFfsConnection constructed
2024-04-06 13:09:56.312 31422-4447  adbd                    adbd                                 I  UsbFfs-monitor thread spawned
2024-04-06 13:09:56.403  1138-1138  ccci_rpcd               ccci_rpcd                            E  Failed to read from RPC device (-1) !! errno = 4
2024-04-06 13:09:56.404  1420-1499  TRS                     ven...iatek.hardware.pq@2.2-service  D  ccorr table index=0
2024-04-06 13:09:56.405  1420-1499  TRS                     ven...iatek.hardware.pq@2.2-service  D  [PQ_SERVICE] setPQParamWithFilter configFlag: 1
2024-04-06 13:09:56.406  1619-1630  [BIP]                   bip                                  I   [BIP AGENT] can not read data now, FD = (4), error number = (-257547029)
2024-04-06 13:09:56.407  1621-1685  VoLTE IMSM              volte_imsm_93                        E  Interrupt happen Interrupted system call (4) (module/mdagent/volte_imsm_93/src/imsmmd.c:2952)
2024-04-06 13:09:56.407  1642-1693  VoLTE IMCB-CM           volte_imcb                           E  RECEIVE error code: EINTR, Need to retry #51
2024-04-06 13:09:56.429  1840-4058  BatteryStatsService     system_server                        I  In wakeup_callback: suspend aborted
2024-04-06 13:09:57.545  1138-1138  ccci_rpcd               ccci_rpcd                            E  Failed to read from RPC device (-1) !! errno = 4
2024-04-06 13:09:57.545  1131-1154  ccci_mdinit             ccci_mdinit                          I  (1):is_delta_same delta t:2 delta b:3 delta:1
2024-04-06 13:09:57.545  1131-1154  ccci_mdinit             ccci_mdinit                          D  (1):monitor_time_update_thread round:4401 ########
2024-04-06 13:09:57.546  1420-1499  TRS                     ven...iatek.hardware.pq@2.2-service  D  ccorr table index=0
2024-04-06 13:09:57.546  1420-1499  TRS                     ven...iatek.hardware.pq@2.2-service  D  [PQ_SERVICE] setPQParamWithFilter configFlag: 1
2024-04-06 13:09:57.549  1621-1685  VoLTE IMSM              volte_imsm_93                        E  Interrupt happen Interrupted system call (4) (module/mdagent/volte_imsm_93/src/imsmmd.c:2952)
2024-04-06 13:09:57.550  1642-1693  VoLTE IMCB-CM           volte_imcb                           E  RECEIVE error code: EINTR, Need to retry #51
2024-04-06 13:09:57.555  1840-2090  OplusWifiCoexManager    system_server                        D  uevent = {SUBSYSTEM=misc, MAJOR=10, wakeup_reason=6;163.70.130.14;443;192.168.0.27;43830;, SEQNUM=46198, ACTION=change, DEVNAME=wlan, MINOR=32, DEVPATH=/devices/virtual/misc/wlan}
2024-04-06 13:09:57.565  1840-2080  OplusConnL...entObsever system_server                        D  com.facebook.katana(163.70.130.***) wakeup host
2024-04-06 13:09:57.573  1840-1990  OplusThermalService     system_server                        E  Could not open '/sys/class/thermal/thermal_zone86/temp'
2024-04-06 13:09:57.574  1840-4058  BatteryStatsService     system_server                        I  In wakeup_callback: resumed from suspend
2024-04-06 13:09:57.835  1400-1400  thermal_repeater        thermal                              I  [recvMdThermalInfo] ret=36, strLen=127,  2, 32767, -127, -28402, 32767, 3072
2024-04-06 13:09:57.939 31422-4447  adbd                    adbd                                 W  timed out while waiting for FUNCTIONFS_BIND, trying again
2024-04-06 13:09:57.939 31422-4447  adbd                    adbd                                 I  UsbFfs: connection terminated: monitor thread finished
2024-04-06 13:09:57.939 31422-31422 adbd                    adbd                                 I  UsbFfs: already offline
2024-04-06 13:09:57.939 31422-31422 adbd                    adbd                                 I  destroying transport UsbFfs
2024-04-06 13:09:57.939 31422-31422 adbd                    adbd                                 I  UsbFfsConnection being destroyed
2024-04-06 13:09:57.984 31422-31429 adbd                    adbd                                 I  opening control endpoint /dev/usb-ffs/adb/ep0
2024-04-06 13:09:57.986 31422-31429 adbd                    adbd                                 I  UsbFfsConnection constructed
2024-04-06 13:09:57.987 31422-4451  adbd                    adbd                                 I  UsbFfs-monitor thread spawned
2024-04-06 13:09:58.152  1840-2707  OplusHansManager        system_server                        I  uid=10299, pkg=com.widgetable.theme.android can transition from M to F
2024-04-06 13:09:58.152  1840-2707  OplusHansManager        system_server                        I  uid=10299, pkg=com.widgetable.theme.android F enter(), M stay=13
2024-04-06 13:09:58.164  1840-2707  OplusHansManager        system_server                        I  freeze uid: 10299 com.widgetable.theme.android pids: [3698, 3556, 3954] IsolatedUid: [99097] scene: LcdOff
2024-04-06 13:09:58.166  5980-11328 IHansComunication       hans                                 D  HansComunication::addUid-- 10299, persistent--0
2024-04-06 13:09:58.166  5980-11328 IHansComunication       hans                                 D  HANS sendMessageToKernel: threadId = 513120468144, netLinkSetup = 1, type = PKG, targetUid = 10299, pkgCmd = ADD_ONE_UID