Unity Cardboard App崩溃"不幸的是,AppName已停止。"

时间:2017-04-13 06:43:02

标签: google-project-tango

按照本教程创建基本的Cardboard Unity App:

https://developers.google.com/tango/apis/unity/unity-cardboard-integration

App在Unity和build上加载正常。但是,在Project Tango Tablet上加载时,应用程序崩溃时没有任何错误。

错误消息显示:

  

./ adb logcat

I/dalvikvm( 4242): Could not find method com.google.unity.GoogleUnityActivity.showAndroidViewLayer, referenced from method com.projecttango.unityuxhelper.TangoUnityUxHelper$1.run
W/dalvikvm( 4242): VFY: unable to resolve virtual method 11944: Lcom/google/unity/GoogleUnityActivity;.showAndroidViewLayer (Landroid/view/View;)V
D/dalvikvm( 4242): VFY: replacing opcode 0x6e at 0x0024
D/TangoUnityHelper( 4242): Binding to Tango Android service.
D/AndroidRuntime( 4242): Shutting down VM
W/dalvikvm( 4242): threadid=1: thread exiting with uncaught exception (group=0x4175bba8)
E/AndroidRuntime( 4242): FATAL EXCEPTION: main
E/AndroidRuntime( 4242): Process: com.google.tango.prefab, PID: 4242
E/AndroidRuntime( 4242): java.lang.Error: FATAL EXCEPTION [main]
E/AndroidRuntime( 4242): Unity version     : 5.6.0b10
E/AndroidRuntime( 4242): Device model      : Google Project Tango Tablet Development Kit
E/AndroidRuntime( 4242): Device fingerprint: google/tango/yellowstone:4.4.2/KOT49H.161129/161129002:user/release-keys
E/AndroidRuntime( 4242):
E/AndroidRuntime( 4242): Caused by: java.lang.NoSuchMethodError: com.google.unity.GoogleUnityActivity.showAndroidViewLayer
E/AndroidRuntime( 4242):    at com.projecttango.unityuxhelper.TangoUnityUxHelper$1.run(TangoUnityUxHelper.java:39)
E/AndroidRuntime( 4242):    at android.os.Handler.handleCallback(Handler.java:733)
E/AndroidRuntime( 4242):    at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime( 4242):    at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 4242):    at android.app.ActivityThread.main(ActivityThread.java:5030)
E/AndroidRuntime( 4242):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4242):    at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 4242):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime( 4242):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
E/AndroidRuntime( 4242):    at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager(  974):   Force finishing activity com.google.tango.prefab/com.google.unity.GoogleUnityActivity
I/dalvikvm-heap(  974): Grow heap (frag case) to 26.696MB for 566416-byte allocation
D/dalvikvm( 4242): GC_CONCURRENT freed 398K, 14% free 3400K/3912K, paused 2ms+1ms, total 13ms
W/ActivityManager(  974): Activity pause timeout for ActivityRecord{42185408 u0 com.google.tango.prefab/com.google.unity.GoogleUnityActivity t10 f}
W/dalvikvm( 1257): a sleep of (0ms, 0ns) requested: forcing a longer delay
D/dalvikvm( 1257): GC_CONCURRENT freed 6330K, 35% free 13908K/21272K, paused 0ms+7ms, total 30ms
D/dalvikvm( 1257): WAIT_FOR_CONCURRENT_GC blocked 17ms
D/dalvikvm( 1257): GC_CONCURRENT freed 2984K, 40% free 12871K/21272K, paused 2ms+2ms, total 22ms
I/ActivityManager(  974): Displayed com.android.launcher/com.android.launcher2.Launcher: +1s171ms
I/dalvikvm-heap( 1257): Grow heap (frag case) to 19.156MB for 468952-byte allocation
D/dalvikvm( 1257): GC_CONCURRENT freed 1235K, 25% free 15971K/21272K, paused 3ms+2ms, total 29ms
D/dalvikvm( 4242): GC_CONCURRENT freed 394K, 14% free 3391K/3912K, paused 1ms+1ms, total 17ms
W/PlatformStatsUtil( 1306): Could not retrieve Usage & Diagnostics setting. Giving up.
W/ActivityManager(  974): Activity destroy timeout for ActivityRecord{42185408 u0 com.google.tango.prefab/com.google.unity.GoogleUnityActivity t10 f}
D/dalvikvm( 4242): GC_CONCURRENT freed 391K, 13% free 3386K/3864K, paused 1ms+1ms, total 25ms
E/WifiController(  974): Not handled here 155652
D/WifiController(  974): battery changed pluggedType: 2
D/dalvikvm( 4242): GC_CONCURRENT freed 386K, 13% free 3387K/3864K, paused 3ms+1ms, total 21ms
D/dalvikvm( 4242): GC_CONCURRENT freed 386K, 13% free 3386K/3864K, paused 3ms+1ms, total 38ms
E/WifiController(  974): Not handled here 155652
D/WifiController(  974): battery changed pluggedType: 2
D/dalvikvm( 4242): GC_CONCURRENT freed 387K, 13% free 3386K/3864K, paused 3ms+1ms, total 19ms
D/dalvikvm( 4242): GC_CONCURRENT freed 387K, 13% free 3386K/3864K, paused 3ms+2ms, total 29ms
E/WifiController(  974): Not handled here 155652
D/WifiController(  974): battery changed pluggedType: 2
D/dalvikvm( 4242): GC_CONCURRENT freed 387K, 13% free 3386K/3864K, paused 2ms+1ms, total 22ms
D/dalvikvm( 4242): GC_CONCURRENT freed 387K, 13% free 3386K/3864K, paused 1ms+1ms, total 13ms
I/ProcessStatsService(  974): Prepared write state in 30ms
I/EventLogChimeraService( 1306): Aggregate from 1492063872720 (log), 1492063872720 (data)
W/PlatformStatsUtil( 1306): Could not retrieve Usage & Diagnostics setting. Giving up.
E/WifiController(  974): Not handled here 155652
D/WifiController(  974): battery changed pluggedType: 2
I/PlayCommon( 1529): [102] com.google.android.play.a.g.e(940): Preparing logs for uploading
I/PlayCommon( 1529): [102] com.google.android.play.a.g.e(942): No file ready to send
I/PlayCommon( 1529): [68] com.google.android.play.a.g.e(940): Preparing logs for uploading
I/PlayCommon( 1529): [68] com.google.android.play.a.g.e(942): No file ready to send
D/dalvikvm( 4242): GC_CONCURRENT freed 387K, 13% free 3386K/3864K, paused 2ms+1ms, total 18ms
D/Raydium_ts_main(  246): ## Report rate in 10 seconds =304
I/Process ( 4242): Sending signal. PID: 4242 SIG: 9
W/InputDispatcher(  974): channel '42384d88 com.google.tango.prefab/com.google.unity.GoogleUnityActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
E/InputDispatcher(  974): channel '42384d88 com.google.tango.prefab/com.google.unity.GoogleUnityActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
I/ActivityManager(  974): Process com.google.tango.prefab (pid 4242) has died.
E/Sensors (  974): [nosae] setDelay: 8000000 sec
D/Sensors (  974): Writing packet 54 32 0A 04 40 1F 00 00 74
W/InputDispatcher(  974): Attempted to unregister already unregistered input channel '42384d88 com.google.tango.prefab/com.google.unity.GoogleUnityActivity (server)'
I/WindowState(  974): WIN DEATH: Window{42384d88 u0 com.google.tango.prefab/com.google.unity.GoogleUnityActivity}
W/WindowManager(  974): Force-removing child win Window{428f0850 u0 SurfaceView} from container Window{42384d88 u0 com.google.tango.prefab/com.google.unity.GoogleUnityActivity}
D/Sensors (  974): Writing packet 54 36 0A 00 74
W/WindowManager(  974): Failed looking up window
W/WindowManager(  974): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@4232de78 does not exist
W/WindowManager(  974):     at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7960)
W/WindowManager(  974):     at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7951)
W/WindowManager(  974):     at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1047)
W/WindowManager(  974):     at android.os.BinderProxy.sendDeathNotice(Binder.java:493)
W/WindowManager(  974):     at dalvik.system.NativeStart.run(Native Method)
I/WindowState(  974): WIN DEATH: null
D/Sensors (  974): Writing packet 54 31 0A 00 74
I/MemoryTrimmer( 2300): Trimming objects from memory, since app is in the background.
E/NvWFDSvc( 1672): onTrimMemory lvl = 5
D/Sensors (  974): Writing packet 54 36 0B 00 74
D/Sensors (  974): Writing packet 54 31 0B 00 74
I/Finsky  ( 1529): [1] com.google.android.finsky.utils.cb.onTrimMemory(17): Memory trim requested to level 60
D/Sensors (  974): Writing packet 54 36 0C 00 74
D/phs:ipc-loc(  181): Socket 11: hangup from client "com.google.tango.prefab"
D/Sensors (  974): Writing packet 54 31 0C 00 74
E/WifiController(  974): Not handled here 155652
D/WifiController(  974): battery changed pluggedType: 2

1 个答案:

答案 0 :(得分:1)

不幸的是,它就是这样。 我也遇到了同样的问题...... 在我删除了所有GoogleVR lib之后,它开始起作用了 所以,我的观点是,你不能将Cardbord lib与Unity 5.6一起使用 在您从资产中删除它之后,就可以了。