Android Studio 应用程序可在真实设备上运行,但不能在虚拟设备模拟器上运行?

时间:2021-03-31 15:48:26

标签: java android android-studio

好奇怪。我一直在用虚拟设备模拟器进行测试,效果很好。(在 Mac 迷你电脑上)

然后我带了一个真正的安卓设备来测试应用程序——虽然应用程序在真实设备上运行良好,但它突然在模拟器上停止工作。 它可以正常启动和构建,但是当我尝试在模拟器上登录应用程序时,它没有正确登录,它说登录失败(尽管登录是正确的并且可以在真实设备上登录)。

我看到一个有类似问题的帖子,它说要增加内存/存储,所以我尝试了,但结果相同。

这是什么原因造成的? 如何让模拟器再次正常运行?提前致谢。

这是Logcat:(如果你注意到尴尬的空格,请忽略-我出于安全原因去掉了目录名)

更新:已解决。首先,第一次,输入用户 ID 插槽突然出现了用户 ID 的“多行” - 所以我(cmd A)选择了所有,删除以清除它。 以及我的一位同事登录,并且有一项安全措施,即只有一台设备可以登录该帐户。

2021-03-31 01:13:22.883 4028-4028/? I/libc: SetHeapTaggingLevel: tag level set to 0
2021-03-31 01:13:22.883 4028-4028/? I/zygote64: Disabled memory mitigations for process.
2021-03-31 01:13:22.911 4028-4028/? I/: Not late-enabling -Xcheck:jni (already on)
2021-03-31 01:13:22.919 4028-4028/? I/: Unquickening 12 vdex files!
2021-03-31 01:13:22.937 4028-4028/? D/CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10121; state: DISABLED
2021-03-31 01:13:22.941 4028-4028/ D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar
2021-03-31 01:13:23.010 4028-4028/ D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-03-31 01:13:23.010 4028-4028/ D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-03-31 01:13:23.020 4028-4051/ D/libEGL: loaded /vendor/lib64/egl/libEGL_emulation.so
2021-03-31 01:13:23.020 4028-4051/ D/libEGL: loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
2021-03-31 01:13:23.021 4028-4051/ D/libEGL: loaded /vendor/lib64/egl/libGLESv2_emulation.so
2021-03-31 01:13:23.040 4028-4028/ W/: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
2021-03-31 01:13:23.040 4028-4028/ W/: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
2021-03-31 01:13:23.064 4028-4049/ D/HostConnection: createUnique: call
2021-03-31 01:13:23.065 4028-4049/ D/HostConnection: HostConnection::get() New Host Connection established 0x7c727832d0, tid 4049
2021-03-31 01:13:23.066 4028-4049/ D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit GL_OES_EGL_image_external_essl3 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_3_0 
2021-03-31 01:13:23.062 4028-4028/ W/RenderThread: type=1400 audit(0.0:280): avc: denied { create } for scontext=u:r:untrusted_app_27:s0:c121,c256,c512,c768 tcontext=u:r:untrusted_app_27:s0:c121,c256,c512,c768 tclass=vsock_socket permissive=0 app=
2021-03-31 01:13:23.067 4028-4049/ W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2021-03-31 01:13:23.068 4028-4049/ D/EGL_emulation: eglCreateContext: 0x7c8277fb70: maj 3 min 0 rcv 3
2021-03-31 01:13:23.066 4028-4028/ W/RenderThread: type=1400 audit(0.0:281): avc: denied { create } for scontext=u:r:untrusted_app_27:s0:c121,c256,c512,c768 tcontext=u:r:untrusted_app_27:s0:c121,c256,c512,c768 tclass=vsock_socket permissive=0 app=
2021-03-31 01:13:23.068 4028-4049/ D/EGL_emulation: eglMakeCurrent: 0x7c8277fb70: ver 3 0 (tinfo 0x7c127a6198) (first time)
2021-03-31 01:13:23.077 4028-4049/ I/Gralloc4: mapper 4.x is not supported
2021-03-31 01:13:23.078 4028-4049/ D/HostConnection: createUnique: call
2021-03-31 01:13:23.078 4028-4049/ D/HostConnection: HostConnection::get() New Host Connection established 0x7c727820d0, tid 4049
2021-03-31 01:13:23.078 4028-4049/ D/goldfish-address-space: allocate: Ask for block of size 0x100
2021-03-31 01:13:23.078 4028-4049/ D/goldfish-address-space: allocate: ioctl allocate returned offset 0x1fd9ac000 size 0x8000
2021-03-31 01:13:23.095 4028-4049/ D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit GL_OES_EGL_image_external_essl3 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_3_0 
2021-03-31 01:13:26.071 4028-4028/ I/TextInputLayout: EditText added is not a TextInputEditText. Please switch to using that class instead.
2021-03-31 01:13:26.073 4028-4028/ I/TextInputLayout: EditText added is not a TextInputEditText. Please switch to using that class instead.
2021-03-31 01:13:38.025 4028-4028/ W/: Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (unsupported,core-platform-api, reflection, allowed)
2021-03-31 01:13:38.025 4028-4028/ W/: Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (unsupported,core-platform-api, reflection, allowed)
2021-03-31 01:13:38.025 4028-4028/ W/: Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (unsupported,core-platform-api, reflection, allowed)
2021-03-31 01:13:38.124 4028-4079/ W/: Accessing hidden method Lcom/android/org/conscrypt/ConscryptEngineSocket;->setUseSessionTickets(Z)V (max-target-q,core-platform-api, reflection, allowed)
2021-03-31 01:13:38.125 4028-4079/ W/: Accessing hidden method Lcom/android/org/conscrypt/ConscryptEngineSocket;->setHostname(Ljava/lang/String;)V (max-target-q,core-platform-api, reflection, allowed)
2021-03-31 01:13:38.125 4028-4079/ W/: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V (max-target-q,core-platform-api, reflection, allowed)
2021-03-31 01:13:38.170 4028-4079/ W/: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (max-target-q,core-platform-api, reflection, allowed)
2021-03-31 01:13:41.629 4028-4049/ D/OpenGLRenderer: endAllActiveAnimators on 0x7ce27c92d0 (RippleDrawable) with handle 0x7c027b6050
2021-03-31 01:14:48.248 4028-4049/ D/OpenGLRenderer: endAllActiveAnimators on 0x7ce27d0740 (RippleDrawable) with handle 0x7c027dd950

0 个答案:

没有答案