Sagar Khurana

Results 119 comments of Sagar Khurana

Interesting in changing the import `import org.junit.Test` with `import org.junit.jupiter.api.Test` its giving the error below ``` java.lang.NullPointerException at app.cash.paparazzi.Paparazzi.createFrameHandler(Paparazzi.kt:141) at app.cash.paparazzi.Paparazzi.createFrameHandler$default(Paparazzi.kt:140) at app.cash.paparazzi.Paparazzi.snapshot(Paparazzi.kt:101) at app.cash.paparazzi.Paparazzi.snapshot$default(Paparazzi.kt:100) at com.xyz.ehub.screenshots.PalletDetailRootScreenshot.defaultState(PalletDetailRootScreenshot.kt:21) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)...

**Working of Coroutines:** From a thread pool, a thread is used. and within that a corutine will be run, if another task is added to the same coroutine, that mean...

**working of findViewById**: for each xml tag, a there is a java class, which we get reference as `view` in the activity, and then we downcast to get the specific...

**What happens on the app start:** ![image](https://github.com/hellosagar/android-interview-questions/assets/50016799/764d2c2a-f4b7-4e76-b54d-cd0b9b5bb9e4)

**Dispatcher**: Responsible for deciding which thread or threads will execute your coroutines. **Dispatcher.IO vs Dispatcher.Default**: Dispatchers.Default is specifically designed for CPU-intensive tasks because it provides a fixed-size thread pool that...

and this is the stack i get from the firebase for this crash ``` Crashed: com.apple.main-thread 0 libsystem_kernel.dylib 0x8874 __pthread_kill + 8 1 libsystem_pthread.dylib 0x62ec pthread_kill + 264 2 libsystem_c.dylib...

Stacktrace from XCode window ``` ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Incident Identifier: 78A6FCEB-34B4-4B8A-8B8F-01B810C954DD CrashReporter Key: B92E4D60-FC75-34C7-2F6E-7597171693A1 Hardware Model: Mac15,11 Process: foo baar [27261] Path: /Users/USER/Library/Developer/CoreSimulator/Devices/8E541F4D-5AFF-41ED-BB44-8203147BB78E/data/Containers/Bundle/Application/907958D7-578D-4ED2-B6D1-9043C2874147/foo baar.app/foo baar Identifier:...

Key Stack Trace Lines for the Calf DatePicker iOS Crash: ``` Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: SIGNAL 6 Abort trap: 6 Thread 0 Crashed:: Dispatch...