【发布时间】:2020-06-14 10:23:02
【问题描述】:
我在游戏中添加了成就。 问题: 如果我获得了成就,它会起作用(它显示 +0 XP )但会重置。所以看起来服务器忽略它。 在 Google API 控制台中,我看到很多错误:
- 时间,游戏
- 2020-06-12T10:49:19.359Z,1
- 2020-06-12T21:37:19.359Z,1
- 2020-06-14T09:37:19.359Z,0.782608695652174
我发现报告“方法错误”。它太大了,所以看起来像:
- 时间,games.achievementDefinitions.list,games.achievements.increment,games.achievements.list,games.achievements.unlock,games.achievements.updateMultiple,games.applications.played,games.players.get,games.scores .list,games.scores.listWindow,games.scores.submitMultiple
- 2020-05-28T10:33:07.231Z,0,,,,,0,0,,,
- 2020-05-28T17:45:07.231Z,0,,0,0,0,0.16071428571428573,0,,,
- 2020-05-28T21:21:07.231Z,0,,0,0,0,0,0,,,
但是我该如何使用它呢? 我检查了troubleshooting 并没有找到任何帮助。
GoogleSignInApi 有效。 登录后的代码:
GamesClient gc = Games.getGamesClient( activity, GoogleSignIn.getLastSignedInAccount( activity ) );
gc.setViewForPopups( activity.findViewById(R.id.root) );
gc.setGravityForPopups( Gravity.TOP | Gravity.CENTER_HORIZONTAL );
//achievements
AchievementsClient ac = Games.getAchievementsClient( activity, GoogleSignIn.getLastSignedInAccount( activity ) );
ac.unlockImmediate( activity.getString(R.string.achievement_first ) );
【问题讨论】:
标签: android google-play-services google-play-console