Why is my Android main_activity not loading on my device but everything works with the emulator?

Published

Problem: I don’t know how to determine on my device why my Android app won’t launch after install, but launches without issue in the emulator? The main_actiity won’t launch (see below) but I receive the permissions check window from the MainActivity.

This app has installed and launched successfully multiple times without issue for months. The last updates I made were a database migration update for a pre-populated DB and presentation updates to a TableLayout. I’m not receiving any errors during debugging, or can find an issue in Logcat. However, I’m still learning Android.

What I have tried: Other than reading some similar issues on this forum. It’s hard, at least for me, to step through an Emulator install that works to find an issue on a phone that doesn’t. Not sure exactly how to find the issue. I’ve looked through the provided Logcat verbose results but being new to Android, nothing jumps out to me. So I also provided an emulator install image vs. phone install image.

Emulator Pixel 4 XL API 28 target Android 9 w/o issue (main_activity did load)

Emulator

Samsung A51 w/ Android 11 (main_activity didn’t load) after clicking "Allow", the error message offers an option to click "App Info" or "Close app" but nothing more specific.

Phone

Logcat (install launch of app to emulator)

2021-11-24 08:29:45.350 29632-29632/? I/llow.researchd: Late-enabling -Xcheck:jni
        at idl.a(SourceFile:4)
        at idm.a(SourceFile:7)
2021-11-24 08:29:45.543 29632-29632/? W/llow.researchd: Unexpected CPU variant for X86 using defaults: x86
2021-11-24 08:29:45.674 29632-29645/? I/llow.researchd: Background concurrent copying GC freed 9026(2MB) AllocSpace objects, 0(0B) LOS objects, 75% free, 993KB/3MB, paused 11.697ms total 85.464ms
2021-11-24 08:29:45.350 29632-29632/? I/llow.researchd: Late-enabling -Xcheck:jni
2021-11-24 08:29:45.543 29632-29632/? W/llow.researchd: Unexpected CPU variant for X86 using defaults: x86
2021-11-24 08:29:45.674 29632-29645/? I/llow.researchd: Background concurrent copying GC freed 9026(2MB) AllocSpace objects, 0(0B) LOS objects, 75% free, 993KB/3MB, paused 11.697ms total 85.464ms
2021-11-24 08:29:45.876 29632-29632/com.mistywillow.researchdb W/ActivityThread: Application com.mistywillow.researchdb is waiting for the debugger on port 8100...
2021-11-24 08:29:45.892 29632-29632/com.mistywillow.researchdb I/System.out: Sending WAIT chunk
2021-11-24 08:29:46.901 29632-29632/com.mistywillow.researchdb I/System.out: Debugger has connected
2021-11-24 08:29:46.903 29632-29632/com.mistywillow.researchdb I/System.out: waiting for debugger to settle...
2021-11-24 08:29:47.105 29632-29632/com.mistywillow.researchdb I/System.out: waiting for debugger to settle...
2021-11-24 08:29:47.711 29632-29632/com.mistywillow.researchdb I/chatty: uid=10087(com.mistywillow.researchdb) identical 3 lines
2021-11-24 08:29:47.913 29632-29632/com.mistywillow.researchdb I/System.out: waiting for debugger to settle...
2021-11-24 08:29:48.114 29632-29632/com.mistywillow.researchdb I/System.out: waiting for debugger to settle...
2021-11-24 08:29:48.315 29632-29632/com.mistywillow.researchdb I/System.out: waiting for debugger to settle...
2021-11-24 08:29:48.518 29632-29632/com.mistywillow.researchdb I/System.out: debugger has settled (1477)
2021-11-24 08:29:48.989 29632-29632/com.mistywillow.researchdb W/llow.researchd: Accessing hidden method Landroid/graphics/drawable/Drawable;->getOpticalInsets()Landroid/graphics/Insets; (light greylist, linking)
2021-11-24 08:29:48.989 29632-29632/com.mistywillow.researchdb W/llow.researchd: Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking)
2021-11-24 08:29:48.989 29632-29632/com.mistywillow.researchdb W/llow.researchd: Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking)
2021-11-24 08:29:48.989 29632-29632/com.mistywillow.researchdb W/llow.researchd: Accessing hidden field Landroid/graphics/Insets;->top:I (light greylist, linking)
2021-11-24 08:29:48.989 29632-29632/com.mistywillow.researchdb W/llow.researchd: Accessing hidden field Landroid/graphics/Insets;->bottom:I (light greylist, linking)
2021-11-24 08:29:49.073 29632-29632/com.mistywillow.researchdb W/llow.researchd: Accessing hidden method Landroid/view/View;->getAccessibilityDelegate()Landroid/view/View$AccessibilityDelegate; (light greylist, linking)
2021-11-24 08:29:49.211 29632-29632/com.mistywillow.researchdb W/llow.researchd: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
2021-11-24 08:29:49.212 29632-29632/com.mistywillow.researchdb W/llow.researchd: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
2021-11-24 08:29:50.329 29632-29632/com.mistywillow.researchdb D/OpenGLRenderer: HWUI GL Pipeline
2021-11-24 08:29:50.939 29632-29669/com.mistywillow.researchdb D/HostConnection: HostConnection::get() New Host Connection established 0xe39f6a10, tid 29669
2021-11-24 08:29:50.943 29632-29669/com.mistywillow.researchdb D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_sync_buffer_data GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2 
2021-11-24 08:29:51.011 29632-29669/com.mistywillow.researchdb I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2021-11-24 08:29:51.012 29632-29669/com.mistywillow.researchdb I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
2021-11-24 08:29:51.012 29632-29669/com.mistywillow.researchdb I/OpenGLRenderer: Initialized EGL, version 1.4
2021-11-24 08:29:51.012 29632-29669/com.mistywillow.researchdb D/OpenGLRenderer: Swap behavior 1
2021-11-24 08:29:51.012 29632-29669/com.mistywillow.researchdb W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2021-11-24 08:29:51.012 29632-29669/com.mistywillow.researchdb D/OpenGLRenderer: Swap behavior 0
2021-11-24 08:29:51.035 29632-29669/com.mistywillow.researchdb D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 0 0
2021-11-24 08:29:51.035 29632-29669/com.mistywillow.researchdb D/EGL_emulation: eglCreateContext: 0xe516b5e0: maj 2 min 0 rcv 2
2021-11-24 08:29:51.055 29632-29669/com.mistywillow.researchdb D/EGL_emulation: eglMakeCurrent: 0xe516b5e0: ver 2 0 (tinfo 0xd25f7460)
2021-11-24 08:29:51.139 29632-29669/com.mistywillow.researchdb D/HostConnection: createUnique: call
2021-11-24 08:29:51.139 29632-29669/com.mistywillow.researchdb D/HostConnection: HostConnection::get() New Host Connection established 0xd250b170, tid 29669
2021-11-24 08:29:51.142 29632-29669/com.mistywillow.researchdb D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_sync_buffer_data GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2 
2021-11-24 08:29:51.142 29632-29669/com.mistywillow.researchdb E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
2021-11-24 08:29:51.206 29632-29632/com.mistywillow.researchdb W/llow.researchd: Accessing hidden field Landroid/os/Trace;->TRACE_TAG_APP:J (light greylist, reflection)
2021-11-24 08:29:51.206 29632-29632/com.mistywillow.researchdb W/llow.researchd: Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (light greylist, reflection)
2021-11-24 08:29:51.206 29632-29632/com.mistywillow.researchdb W/llow.researchd: Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (light greylist, reflection)
2021-11-24 08:29:51.207 29632-29632/com.mistywillow.researchdb W/llow.researchd: Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (light greylist, reflection)
2021-11-24 08:29:51.207 29632-29632/com.mistywillow.researchdb W/llow.researchd: Accessing hidden method Landroid/os/Trace;->traceCounter(JLjava/lang/String;I)V (light greylist, reflection)
2021-11-24 08:29:51.208 29632-29632/com.mistywillow.researchdb W/RecyclerView: No adapter attached; skipping layout
2021-11-24 08:29:51.615 29632-29669/com.mistywillow.researchdb D/EGL_emulation: eglMakeCurrent: 0xe516b5e0: ver 2 0 (tinfo 0xd25f7460)
2021-11-24 08:29:51.820 29632-29669/com.mistywillow.researchdb I/chatty: uid=10087(com.mistywillow.researchdb) RenderThread identical 2 lines
2021-11-24 08:29:51.894 29632-29669/com.mistywillow.researchdb D/EGL_emulation: eglMakeCurrent: 0xe516b5e0: ver 2 0 (tinfo 0xd25f7460)
2021-11-24 08:29:53.133 29632-29669/com.mistywillow.researchdb D/EGL_emulation: eglMakeCurrent: 0xe516b5e0: ver 2 0 (tinfo 0xd25f7460)
2021-11-24 08:35:39.546 29632-29669/com.mistywillow.researchdb D/EGL_emulation: eglMakeCurrent: 0xe516b5e0: ver 2 0 (tinfo 0xd25f7460)
2021-11-24 08:35:39.913 29632-29669/com.mistywillow.researchdb D/EGL_emulation: eglMakeCurrent: 0xe516b5e0: ver 2 0 (tinfo 0xd25f7460)
2021-11-24 08:35:42.888 29632-29669/com.mistywillow.researchdb D/EGL_emulation: eglMakeCurrent: 0xe516b5e0: ver 2 0 (tinfo 0xd25f7460)

Source: Android Questions

Published
Categorized as android, android-activity, java

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq