我的Android版Unity应用中的Google游戏服务存在一个非常奇怪的问题。我正在使用 this library 在建立与房间的连接后,我开始向房间中的所有玩家发送消息(仅1个字节)。几秒钟后,我遇到异常:无法与RAS通信 在这里,您可以看到日志:(the same thing on github gist)
05-29 12:05:42.824 E/RSCStateMachine( 2288): Unable to communicate with RAS
05-29 12:05:42.824 E/RSCStateMachine( 2288): android.os.RemoteException: RoomAndroidService has died
05-29 12:05:42.824 E/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.RoomClientState.getRemoteException(RoomClientState.java:51)
05-29 12:05:42.824 E/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.WaitServiceSetupState$1.binderDied(WaitServiceSetupState.java:44)
05-29 12:05:42.824 E/RSCStateMachine( 2288): at android.os.BinderProxy.sendDeathNotice(Binder.java:551)
05-29 12:05:42.836 I/RSCStateMachine( 2288): Unable to kill RAS (may already be dead)
05-29 12:05:42.836 I/RSCStateMachine( 2288): android.os.DeadObjectException
05-29 12:05:42.836 I/RSCStateMachine( 2288): at android.os.BinderProxy.transactNative(Native Method)
05-29 12:05:42.836 I/RSCStateMachine( 2288): at android.os.BinderProxy.transact(Binder.java:496)
05-29 12:05:42.836 I/RSCStateMachine( 2288): at com.google.android.gms.games.internal.IRoomService$Stub$Proxy.kill(IRoomService.java:388)
05-29 12:05:42.836 I/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.RoomServiceClientStateMachine.handleRasFailure(RoomServiceClientStateMachine.java:111)
05-29 12:05:42.836 I/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.RoomClientState.handleRasFailure(RoomClientState.java:45)
05-29 12:05:42.836 I/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.WaitServiceSetupState$1.binderDied(WaitServiceSetupState.java:44)
05-29 12:05:42.836 I/RSCStateMachine( 2288): at android.os.BinderProxy.sendDeathNotice(Binder.java:551)
05-29 12:05:42.847 E/RSCStateMachine( 2288): Unable to communicate with RAS
05-29 12:05:42.847 E/RSCStateMachine( 2288): android.os.RemoteException: Service disconnected
05-29 12:05:42.847 E/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.RoomClientState.getRemoteException(RoomClientState.java:51)
05-29 12:05:42.847 E/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.UnboundState$RoomAndroidServiceConnection.onServiceDisconnected(UnboundState.java:79)
05-29 12:05:42.847 E/RSCStateMachine( 2288): at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1219)
05-29 12:05:42.847 E/RSCStateMachine( 2288): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1233)
05-29 12:05:42.847 E/RSCStateMachine( 2288): at android.os.Handler.handleCallback(Handler.java:739)
05-29 12:05:42.847 E/RSCStateMachine( 2288): at android.os.Handler.dispatchMessage(Handler.java:95)
05-29 12:05:42.847 E/RSCStateMachine( 2288): at android.os.Looper.loop(Looper.java:211)
05-29 12:05:42.847 E/RSCStateMachine( 2288): at android.app.ActivityThread.main(ActivityThread.java:5371)
05-29 12:05:42.847 E/RSCStateMachine( 2288): at java.lang.reflect.Method.invoke(Native Method)
05-29 12:05:42.847 E/RSCStateMachine( 2288): at java.lang.reflect.Method.invoke(Method.java:372)
05-29 12:05:42.847 E/RSCStateMachine( 2288): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:945)
05-29 12:05:42.847 E/RSCStateMachine( 2288): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:740)
05-29 12:05:42.848 I/RSCStateMachine( 2288): Unable to kill RAS (may already be dead)
05-29 12:05:42.848 I/RSCStateMachine( 2288): android.os.DeadObjectException
05-29 12:05:42.848 I/RSCStateMachine( 2288): at android.os.BinderProxy.transactNative(Native Method)
05-29 12:05:42.848 I/RSCStateMachine( 2288): at android.os.BinderProxy.transact(Binder.java:496)
05-29 12:05:42.848 I/RSCStateMachine( 2288): at com.google.android.gms.games.internal.IRoomService$Stub$Proxy.kill(IRoomService.java:388)
05-29 12:05:42.848 I/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.RoomServiceClientStateMachine.handleRasFailure(RoomServiceClientStateMachine.java:111)
05-29 12:05:42.848 I/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.UnboundState$RoomAndroidServiceConnection.onServiceDisconnected(UnboundState.java:79)
05-29 12:05:42.848 I/RSCStateMachine( 2288): at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1219)
05-29 12:05:42.848 I/RSCStateMachine( 2288): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1233)
05-29 12:05:42.848 I/RSCStateMachine( 2288): at android.os.Handler.handleCallback(Handler.java:739)
05-29 12:05:42.848 I/RSCStateMachine( 2288): at android.os.Handler.dispatchMessage(Handler.java:95)
05-29 12:05:42.848 I/RSCStateMachine( 2288): at android.os.Looper.loop(Looper.java:211)
05-29 12:05:42.848 I/RSCStateMachine( 2288): at android.app.ActivityThread.main(ActivityThread.java:5371)
05-29 12:05:42.848 I/RSCStateMachine( 2288): at java.lang.reflect.Method.invoke(Native Method)
05-29 12:05:42.848 I/RSCStateMachine( 2288): at java.lang.reflect.Method.invoke(Method.java:372)
05-29 12:05:42.848 I/RSCStateMachine( 2288): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:945)
05-29 12:05:42.848 I/RSCStateMachine( 2288): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:740)
05-29 12:05:42.848 E/RSCStateMachine( 2288): Unable to communicate with RAS
05-29 12:05:42.848 E/RSCStateMachine( 2288): android.os.DeadObjectException
05-29 12:05:42.848 E/RSCStateMachine( 2288): at android.os.BinderProxy.transactNative(Native Method)
05-29 12:05:42.848 E/RSCStateMachine( 2288): at android.os.BinderProxy.transact(Binder.java:496)
05-29 12:05:42.848 E/RSCStateMachine( 2288): at com.google.android.gms.games.internal.IRoomService$Stub$Proxy.leaveRoom(IRoomService.java:293)
05-29 12:05:42.848 E/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.InRoomState.generateLeaveOnBehalfOfClient(InRoomState.java:597)
05-29 12:05:42.848 E/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.InRoomState.processMessage(InRoomState.java:338)
05-29 12:05:42.848 E/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.TypeSafeTransitionState$1.processMessage(TypeSafeTransitionState.java:61)
05-29 12:05:42.848 E/RSCStateMachine( 2288): at com.google.android.gms.common.util.state.StateMachine$SmHandler.processMsg(StateMachine.java:1188)
05-29 12:05:42.848 E/RSCStateMachine( 2288): at com.google.android.gms.common.util.state.StateMachine$SmHandler.handleMessage(StateMachine.java:988)
05-29 12:05:42.848 E/RSCStateMachine( 2288): at android.os.Handler.dispatchMessage(Handler.java:102)
05-29 12:05:42.848 E/RSCStateMachine( 2288): at android.os.Looper.loop(Looper.java:211)
05-29 12:05:42.848 E/RSCStateMachine( 2288): at android.os.HandlerThread.run(HandlerThread.java:61)
05-29 12:05:42.849 I/RSCStateMachine( 2288): Unable to kill RAS (may already be dead)
05-29 12:05:42.849 I/RSCStateMachine( 2288): android.os.DeadObjectException
05-29 12:05:42.849 I/RSCStateMachine( 2288): at android.os.BinderProxy.transactNative(Native Method)
05-29 12:05:42.849 I/RSCStateMachine( 2288): at android.os.BinderProxy.transact(Binder.java:496)
05-29 12:05:42.849 I/RSCStateMachine( 2288): at com.google.android.gms.games.internal.IRoomService$Stub$Proxy.kill(IRoomService.java:388)
05-29 12:05:42.849 I/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.RoomServiceClientStateMachine.handleRasFailure(RoomServiceClientStateMachine.java:111)
05-29 12:05:42.849 I/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.RoomClientState.handleRasFailure(RoomClientState.java:45)
05-29 12:05:42.849 I/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.InRoomState.generateLeaveOnBehalfOfClient(InRoomState.java:599)
05-29 12:05:42.849 I/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.roomclient.InRoomState.processMessage(InRoomState.java:338)
05-29 12:05:42.849 I/RSCStateMachine( 2288): at com.google.android.gms.games.service.statemachine.TypeSafeTransitionState$1.processMessage(TypeSafeTransitionState.java:61)
05-29 12:05:42.849 I/RSCStateMachine( 2288): at com.google.android.gms.common.util.state.StateMachine$SmHandler.processMsg(StateMachine.java:1188)
05-29 12:05:42.849 I/RSCStateMachine( 2288): at com.google.android.gms.common.util.state.StateMachine$SmHandler.handleMessage(StateMachine.java:988)
05-29 12:05:42.849 I/RSCStateMachine( 2288): at android.os.Handler.dispatchMessage(Handler.java:102)
05-29 12:05:42.849 I/RSCStateMachine( 2288): at android.os.Looper.loop(Looper.java:211)
05-29 12:05:42.849 I/RSCStateMachine( 2288): at android.os.HandlerThread.run(HandlerThread.java:61)