Google Play排行榜仅显示本人,已关联好友数据未展示问题求助
Hey there! Let's walk through the most likely issues that could be causing your leaderboards to only display your data, even though your friends are playing and connected to Google Play Games. Since your two test accounts work fine, your core code logic is probably solid—so we'll focus on configuration, visibility, and account-related checks.
1. Check Leaderboard Visibility Settings in Play Console
This is the most common culprit. Head over to your Play Console, navigate to Game Services > Leaderboards, and select your target leaderboard:
- Ensure the Visibility setting isn't set to Private or Only visible to testers. If it is, only accounts added to your tester list (like your two test accounts) will see the full leaderboard data.
- Switch it to Public or adjust the visibility to include all users if you want friends to see each other's scores.
2. Verify Friend Connections & Google Play Games Settings
Even if your friends are playing and logged into Google Play Games, there are a few checks to make:
- Confirm that you and your friends have mutually added each other in Google Play Games. One-way friend requests won't let you see each other's leaderboard data.
- Ask your friends to check their Google Play Games app settings: Make sure Social features are enabled. If this is turned off, their scores won't appear in friend leaderboards.
- Ensure your friends are using the same Google account for both Google Play Games and your app. Sometimes users might log into the app with a different account than their Play Games profile, leading to disconnected data.
3. Confirm Leaderboard is Fully Published
Even if your app is live, it's easy to overlook that the leaderboard itself might still be in a testing state:
- In Play Console, check if your leaderboard is marked as Published (not in "Testing" or "Draft"). If it's still in testing, only your registered testers will see the data.
- Double-check that you've completed all required steps for leaderboard activation (like agreeing to policies, if prompted).
4. Validate Score Submission on Friend Devices
While your test accounts work, friend devices might have edge cases with GoogleApiClient connections:
- Add logging to your
onConnectedcallback (e.g.,Log.d("Leaderboard", "Score submitted: " + totalStars)) so friends can share logs to confirm the score is actually being sent. - Consider using
Games.Leaderboards.submitScoreImmediate()instead of the async method—it returns aPendingResultthat you can check for success/failure, which might reveal connection issues on friend devices. - Make sure your
GoogleApiClientisn't being disconnected prematurely before the score is submitted. Your current code unregisters callbacks after submission, but ensure the client stays connected long enough for the request to go through.
5. Account for Google Play Data Sync Delays
Google Play's leaderboard data can take time to sync across devices, especially for new users or recently published leaderboards:
- Ask friends to log out and back into Google Play Games and your app to trigger a sync.
- Wait a few hours—sometimes it takes up to 24 hours for new scores to appear in cross-user leaderboards, especially if the leaderboard was just published.
Note on the Achievement Warning
You're right to ignore the Play Console warning about unimplemented achievements—it has no impact on leaderboard functionality. That prompt is a generic reminder, and since you haven't added achievement features, it's irrelevant here.
Start with the visibility and friend connection checks first—those are the quickest fixes. If those don't resolve it, move on to validating score submissions and checking for sync delays.
内容的提问来源于stack exchange,提问作者Abhijeet

