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

时间:2018-05-08 15:16:47

标签: android unity3d

您好我正在尝试从Android打开一个嵌入式Unity 3D项目但是当我尝试在实际手机(Google Pixel XL)上运行时,似乎该项目将会打开,但会立即关闭并返回到Android应用程序。当我在模拟器(同一部手机)中打开应用程序时,Unity 3d项目打开正常。我的堆栈跟踪中列出了几个错误,并且在我尝试运行应用程序时附加了完整的logcat。从搜索这些错误,我发现没有具体解决这个问题。如果有人有任何建议,请告诉我。我的代码可以在以下链接中找到

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

更新:我试图在较旧的手机上打开Unity 3D项目,它完全打开。是否有额外的权限或Pixel需要包含的任何内容?

更新:我运行了一个内存配置文件,但我不确定如何解释它。我的输出显示如下:

memory profile

screenshot of phone emulator

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

1 个答案:

答案 0 :(得分:0)

Daydream has been discontinued.

Pixel 3 XL是经过认证的设备。但这现在已经毫无意义。欢迎您将问题发布到Daydream GitHub,该问题已经处于维护模式将近两年了。

尽管如此,您的问题确实是使用不良版本的Daydream SDK的权限问题图形API问题。基本上,您将不得不尝试使用这些旧/新版本的组合,直到它起作用为止。您无能为力。

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