我为我的游戏实现了google游戏服务以获得排行榜和成就,我的游戏正常构建,但是当我尝试在Android上启动它时,它会在Unity splash徽标显示之前崩溃,logcat给了我:
com.FarSouth.RocketJumper/com.unity3d.player.UnityPlayerActivity
03-03 16:48:59.617 2993 2993 D ActivityManager: starting Active launch
03-03 16:48:59.648 2993 5385 I ActivityManager: START u0 {act=android.intent.action.MAIN typ=null flg=0x10200000 cmp=ComponentInfo{com.FarSouth.RocketJumper/com.unity3d.player.UnityPlayerActivity}} from uid 10077
03-03 16:48:59.665 2993 3769 I ActivityManager: DSS on for com.FarSouth.RocketJumper and scale is 0.75
03-03 16:48:59.702 2993 3628 D ActivityManager: isScaleDownAnimationEnabled() : false
03-03 16:48:59.702 2993 3628 D ActivityManager: applyOptionsLocked, ANIM_CUSTOM_SCALE_UP, x : 803, y : 879, isHomeItem : false
03-03 16:48:59.702 2993 3628 D ActivityManager: applyOptionsLocked, ANIM_CUSTOM_SCALE_UP, task.getRootActivity() : ActivityRecord{f3e35f2 u0 com.FarSouth.RocketJumper/com.unity3d.player.UnityPlayerActivity t21599}, task.getTaskToReturnTo() : 1
03-03 16:48:59.702 2993 3628 D ActivityManager: setAppIconInfo(), x : 803, y : 879, width : 251, height : 312, isHomeItem : false
03-03 16:48:59.704 2993 3628 I ActivityManager: Config changes=480 {0 1.0 themeSeq = 0 showBtnBg = 0 206mcc10mnc [pt_BR,fr_BE] ldltr sw360dp w640dp h336dp 480dpi nrml long land finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1920, 1080) s.21}
03-03 16:48:59.724 2993 3628 I ActivityManager: Override config changes=480 {0 1.0 themeSeq = 0 showBtnBg = 0 206mcc10mnc [pt_BR,fr_BE] ldltr sw360dp w640dp h336dp 480dpi nrml long land finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1920, 1080) s.21} for displayId=0
03-03 16:48:59.762 2993 3314 D ActivityManager: package com.samsung.android.game.gametools, user - 0 is SDcard whitelisted
03-03 16:48:59.775 2993 3314 I ActivityManager: Start proc 32163:com.samsung.android.game.gametools/u0a27 for service com.samsung.android.game.gametools/.floatingui.service.external.GameToolsIntentService
03-03 16:48:59.781 2993 5473 W ActivityManager: crash : com.FarSouth.RocketJumper,0
03-03 16:48:59.795 2993 5473 W ActivityManager: Force finishing activity com.FarSouth.RocketJumper/com.unity3d.player.UnityPlayerActivity
03-03 16:48:59.817 2993 5385 I ActivityManager: DSS on for com.samsung.android.game.gametools and scale is 1.0
03-03 16:48:59.857 2993 3628 I ActivityManager: Config changes=480 {0 1.0 themeSeq = 0 showBtnBg = 0 206mcc10mnc [pt_BR,fr_BE] ldltr sw360dp w360dp h616dp 480dpi nrml long port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1920) s.22}
03-03 16:48:59.884 2993 3628 I ActivityManager: Override config changes=480 {0 1.0 themeSeq = 0 showBtnBg = 0 206mcc10mnc [pt_BR,fr_BE] ldltr sw360dp w360dp h616dp 480dpi nrml long port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1080, 1920) s.22} for displayId=0
03-03 16:48:59.914 2993 3027 I ActivityManager: Showing crash dialog for package com.FarSouth.RocketJumper u0
03-03 16:48:59.995 2993 5329 D PackageManager: getSelectedMetaData : packageName(com.FarSouth.RocketJumper) or Metadata strings {[Ljava.lang.String;@b99c7e3}
03-03 16:49:00.307 2993 3026 W ActivityManager: Activity pause timeout for ActivityRecord{f3e35f2 u0 com.FarSouth.RocketJumper/com.unity3d.player.UnityPlayerActivity t21599 f}
03-03 16:49:00.313 2993 3026 D ActivityManager: isScaleDownAnimationEnabled() : true
03-03 16:49:00.313 2993 3026 D ActivityManager: clearAppIconInfo()
03-03 16:49:00.313 2993 3026 D ActivityManager: applyOptionsLocked, ANIM_CUSTOM_SCALE_DOWN
03-03 16:49:00.343 2993 5329 D ActivityManager: post active user change for 0 fullscreen true isHomeActivity() true
我对崩溃日志没有任何经验,但似乎它的Android游戏工具或Unity播放器活动正在崩溃我的游戏?在将GPGS添加到我的游戏之前,它正常工作。提前致谢。
我知道如果你没有设置它的ID,GPGS会让你的游戏崩溃并出现IllegalStateException。我认为这就是这种情况,虽然我在你的日志中看不到它。
你在游戏中有Admob SDK吗? GPGS和Admob并不能很好地协同工作。也许使用旧版本的GPGS,最新版本经常出现问题。