简体   繁体   English

Unity3D 项目在模拟器中打开但不在手机上

[英]Unity3D project opens in the Emulator but not on the phone

Hello I am trying to open an embedded Unity 3D project from android but when I try to run on an actual phone (Google Pixel XL), it seems like the project is going to open up but immediately closes and returns back to the android app.您好,我正在尝试从 android 打开一个嵌入式 Unity 3D 项目,但是当我尝试在实际手机(Google Pixel XL)上运行时,该项目似乎要打开但立即关闭并返回到 android 应用程序。 When I open the app in an emulator (of the same phone) the Unity 3d Project opens up fine.当我在模拟器(同一部手机)中打开应用程序时,Unity 3d 项目打开正常。 I do have several errors listed on my stacktrace and have attached the complete logcat from when I attempt to run the app.我的堆栈跟踪中确实列出了几个错误,并附上了我尝试运行该应用程序时的完整 logcat。 From searching about those errors I have found nothing concrete that solves this issue.通过搜索这些错误,我没有发现任何具体的解决这个问题的方法。 If anyone has any suggestions please let me know.如果有人有任何建议,请告诉我。 My code can be found at the following link我的代码可以在以下链接中找到

https://drive.google.com/drive/folders/167mCvox1d564VUw4EsNbDn_ir2jP3QrZ?usp=sharing https://drive.google.com/drive/folders/167mCvox1d564VUw4EsNbDn_ir2jP3QrZ?usp=sharing

UPDATE: I have tried to open the Unity 3D project on an older phone and it opens up perfectly.更新:我尝试在较旧的手机上打开 Unity 3D 项目,它打开得很好。 Are there additional permissions or anything that need to be included with the Pixel?是否有额外的权限或需要包含在 Pixel 中的任何内容?

UPDATE: I ran a memory profile, but am unsure how to interpret it.更新:我运行了一个内存配置文件,但不确定如何解释它。 I have the output displayed below:我的输出显示如下:

内存配置文件

手机截图 模拟器

LOGCAT:逻辑猫:

05-08 10:10:17.967 14966-14987/? I/Adreno: PFP: 0x005ff087, ME: 0x005ff063
05-08 10:10:17.972 14966-14987/? I/zygote: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
05-08 10:10:17.973 14966-14987/? I/OpenGLRenderer: Initialized EGL, version 1.4
05-08 10:10:17.973 14966-14987/? D/OpenGLRenderer: Swap behavior 2
05-08 10:10:22.204 14966-15162/com.example.kshah.unityvrtest I/Unity: SystemInfo CPU = ARMv7 VFPv3 NEON, Cores = 4, Memory = 3753mb
    SystemInfo ARM big.LITTLE configuration: 2 big (mask: 12), 2 little (mask: 3)
05-08 10:10:22.205 14966-15162/com.example.kshah.unityvrtest I/Unity: ApplicationInfo com.example.kshah.unityvrtest version 1.0 build c35f44f5-89ae-4e59-bedb-0c7f4e71bee4
05-08 10:10:22.211 14966-14987/com.example.kshah.unityvrtest D/OpenGLRenderer: endAllActiveAnimators on 0xd370b500 (RippleDrawable) with handle 0xd33cc0f0
05-08 10:10:22.285 14966-15162/com.example.kshah.unityvrtest E/Unity: Unable to find AudioPluginMsHRTF
05-08 10:10:22.287 14966-15162/com.example.kshah.unityvrtest E/Unity: Unable to find AudioPluginOculusSpatializer
05-08 10:10:22.289 14966-15162/com.example.kshah.unityvrtest E/Unity: Unable to find libaudioplugingvrunity
05-08 10:10:22.295 14966-15162/com.example.kshah.unityvrtest E/Unity: Unable to find libAudioPluginOculusSpatializer
05-08 10:10:22.316 14966-15162/com.example.kshah.unityvrtest D/Unity:  GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_half_float GL_OES_framebuffer_object GL_OES_rgb8_rgba8 GL_OES_compressed_ETC1_RGB8_texture GL_AMD_compressed_ATC_texture GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_OES_texture_compression_astc GL_OES_texture_npot GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_OES_texture_3D GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_QCOM_alpha_test GL_OES_depth24 GL_OES_packed_depth_stencil GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_EXT_sRGB GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_EXT_texture_type_2_10_10_10_REV GL_EXT_texture_sRGB_decode GL_OES_element_index_uint GL_EXT_copy_image GL_EXT_geometry_shader GL_EXT_tessellation_shader GL_OES_texture_stencil8 GL_EXT_shader_io_blocks GL_OES_shader_image_atomic GL_OES_sample_variables GL_EXT_texture_border_clamp GL_EXT_multisampled_render_to_texture GL_EXT_mul
    tisampled_render_to_texture2 GL_OES_shader_multisample_interpolation GL_EXT_texture_cube_map_array GL_EXT_draw_buffers_indexed GL_EXT_gpu_shader5 GL_EXT_robustness GL_EXT_texture_buffer GL_EXT_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_OES_texture_storage_multisample_2d_array GL_OES_sample_shading GL_OES_get_program_binary GL_EXT_debug_label GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_QCOM_tiled_rendering GL_ANDROID_extension_pack_es31a GL_EXT_primitive_bounding_box GL_OES_standard_derivatives GL_OES_vertex_array_object GL_EXT_disjoint_timer_query GL_KHR_debug GL_EXT_YUV_target GL_EXT_sRGB_write_control GL_EXT_texture_norm16 GL_EXT_discard_framebuffer GL_OES_surfaceless_context GL_OVR_multiview GL_OVR_multiview2 GL_EXT_texture_sRGB_R8 GL_KHR_no_error GL_EXT_debug_marker GL_OES_EGL_image_external_essl3 GL_OVR_multiview_multisampled_render_to_texture GL_EXT_buffer_storage GL_EXT_external_buffer GL_EXT_blit_framebuffer_params GL_EXT_clip_cull_distance
     GL_EXT_protected_textures GL_EXT_shader_non_constant_global_initializers GL_QCOM_framebuffer_foveated GL_QCOM_shader_framebuffer_fetch_noncoherent GL_EXT_EGL_image_array GL_NV_shader_noperspective_interpolation
    TrackPlayerBase::TrackPlayerBase()
05-08 10:10:22.353 14966-15162/com.example.kshah.unityvrtest I/libOpenSLES: Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2)
05-08 10:10:22.353 14966-15162/com.example.kshah.unityvrtest W/AudioTrack: notificationFrames=-10 clamped to the range -1 to -8
05-08 10:10:22.355 14966-15162/com.example.kshah.unityvrtest I/AudioTrack: AUDIO_OUTPUT_FLAG_FAST successful; frameCount 1536 -> 1536
05-08 10:10:22.355 14966-15162/com.example.kshah.unityvrtest D/AudioTrack: Client defaulted notificationFrames to 192 for frameCount 1536
05-08 10:10:22.731 14966-15162/com.example.kshah.unityvrtest V/MediaRouter: Adding route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
05-08 10:10:22.737 14966-15162/com.example.kshah.unityvrtest V/MediaRouter: Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
05-08 10:10:22.763 14966-14972/com.example.kshah.unityvrtest I/zygote: Do partial code cache collection, code=22KB, data=30KB
    After code cache collection, code=22KB, data=30KB
05-08 10:10:22.764 14966-14972/com.example.kshah.unityvrtest I/zygote: Increasing code cache capacity to 128KB
05-08 10:10:22.808 14966-14966/com.example.kshah.unityvrtest D/SdkConfigurationReader: Fetched params from VrParamsProvider: allow_dynamic_java_library_loading: true
    allow_dynamic_library_loading: true
    async_reprojection_config <
      flags: 0
    >
    cpu_late_latching_enabled: true
    daydream_image_alignment: 3
    use_device_idle_detection: true
    use_magnetometer_in_sensor_fusion: true
    use_online_magnetometer_calibration: true
    use_system_clock_for_sensor_timestamps: false
05-08 10:10:22.847 14966-14966/com.example.kshah.unityvrtest W/native: commandlineflags.cc:1503 Ignoring RegisterValidateFunction() for flag pointer 0xccc234d0: no flag found at that address
05-08 10:10:22.843 14966-14966/com.example.kshah.unityvrtest W/hah.unityvrtest: type=1400 audit(0.0:7297): avc: denied { read } for name="stat" dev="proc" ino=4026532357 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc_stat:s0 tclass=file permissive=0
05-08 10:10:22.873 14966-14966/com.example.kshah.unityvrtest I/NativeLibraryLoader: VrCore composition disabled, using in-process compositing fallback.
05-08 10:10:22.876 14966-14966/com.example.kshah.unityvrtest I/Ion: [vr/gvr/capi/src/gvr_core_api_loader_android.cc:183] Successfully loaded GVR library version 1.140.0 from VrCore (target was 1.60.1).
05-08 10:10:22.911 14966-14966/com.example.kshah.unityvrtest I/GVR: [vr/gvr/capi/src/gvr.cc:103] Initialized GVR version 1.140.0
05-08 10:10:22.916 14966-15197/com.example.kshah.unityvrtest D/NetworkSecurityConfig: No Network Security Config specified, using platform default
05-08 10:10:22.946 14966-14966/com.example.kshah.unityvrtest I/GvrLayoutFactory: Successfully loaded GvrLayout from VrCore.
05-08 10:10:22.957 14966-14966/com.example.kshah.unityvrtest E/SdkDaydreamTouchListener: Null deviceParams or no alignment markers found.
05-08 10:10:23.064 14966-14966/com.example.kshah.unityvrtest E/SdkDaydreamTouchListener: Null deviceParams or no alignment markers found.
05-08 10:10:23.136 14966-15162/com.example.kshah.unityvrtest I/GVR: [vr/gvr/hmd/cardboard/cardboard_api_impl.cc:500] Creating swap chain with id: [1]
    [vr/gvr/hmd/cardboard/cardboard_api_impl.cc:504]   BufferSpec 0: Size=V[1807, 2291], ColorFormat=Rgba8888, Samples=0, Views=1
    [vr/gvr/hmd/cardboard/cardboard_api_impl.cc:504]   BufferSpec 1: Size=V[1807, 2291], ColorFormat=Rgba8888, Samples=0, Views=1
    [vr/gvr/hmd/cardboard/cardboard_api_impl.cc:517] Destroying swap chain with id: [1]
    [vr/gvr/hmd/cardboard/cardboard_api_impl.cc:500] Creating swap chain with id: [4]
    [vr/gvr/hmd/cardboard/cardboard_api_impl.cc:504]   BufferSpec 0: Size=V[1265, 1604], ColorFormat=Rgba8888, Samples=0, Views=1
05-08 10:10:23.137 14966-15162/com.example.kshah.unityvrtest I/GVR: [vr/gvr/hmd/cardboard/cardboard_api_impl.cc:504]   BufferSpec 1: Size=V[1265, 1604], ColorFormat=Rgba8888, Samples=0, Views=1
05-08 10:10:23.208 14966-15162/com.example.kshah.unityvrtest D/AudioTrack: stop() called with 40512 frames delivered
05-08 10:10:23.350 14966-15162/com.example.kshah.unityvrtest I/Unity: Could not recreate VR window because GfxDevice is in an invalid state (device lost)

    (Filename:  Line: 901)
05-08 10:10:23.350 14966-15162/com.example.kshah.unityvrtest E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
05-08 10:10:23.346 14966-14972/com.example.kshah.unityvrtest I/zygote: Do partial code cache collection, code=43KB, data=51KB
05-08 10:10:23.351 14966-14972/com.example.kshah.unityvrtest I/zygote: After code cache collection, code=43KB, data=51KB
    Increasing code cache capacity to 256KB
05-08 10:10:23.406 14966-14966/com.example.kshah.unityvrtest E/SdkDaydreamTouchListener: Null deviceParams or no alignment markers found.
05-08 10:10:23.426 14966-14966/com.example.kshah.unityvrtest V/MediaRouter: onRestoreRoute() : route=RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
    Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
05-08 10:10:23.550 14966-15162/com.example.kshah.unityvrtest E/Unity: Error trying to call delegated method pause. null
05-08 10:10:23.552 14966-15162/com.example.kshah.unityvrtest D/AudioTrack: stop() called with 11328 frames delivered
05-08 10:10:23.587 14966-14966/com.example.kshah.unityvrtest I/Process: Sending signal. PID: 14966 SIG: 9

Daydream has been discontinued. Daydream 已停产。

The Pixel 3 XL is a certified device. Pixel 3 XL 是经过认证的设备。 But that's sort of meaningless now.但这现在有点毫无意义。 You are welcome to post an issue to the Daydream GitHub, which has been in maintenance mode for almost 2 years now.欢迎您向 Daydream GitHub 发布问题,该 GitHub 已处于维护模式近 2 年。

Nonetheless, your issue is indeed the permissions issue and the graphics API issue and using a bad version of the Daydream SDK.尽管如此,您的问题确实是权限问题图形 API 问题以及使用了错误版本的 Daydream SDK。 You will basically have to try combinations of older/newer versions of these until it works.您基本上必须尝试这些旧/新版本的组合,直到它起作用为止。 There is nothing you can do.你无能为力。

05-08 10:10:22.843 14966-14966/com.example.kshah.unityvrtest W/hah.unityvrtest: type=1400 audit(0.0:7297): avc: denied { read } for name="stat" dev="proc" ino=4026532357 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc_stat:s0 tclass=file permissive=0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM