我正在使用此插件在 Ionic React/Capacitor 项目中实现 Google Play 游戏服务。
但是,当我调用 时GameServices.showLeaderboard("abcdefghijklmnopqr");,logcat 显示以下内容:
05-09 07:44:51.544 15437 15524 V Capacitor/Plugin: To native (Capacitor plugin): callbackId: 129018517, pluginId: GameServices, methodName: showLeaderboard
05-09 07:44:51.544 15437 15524 V Capacitor: callback: 129018517, pluginId: GameServices, methodName: showLeaderboard, methodData: {}
05-09 07:44:51.545 15437 15502 W GameServices: showLeaderboard called without providing leaderboardId
Run Code Online (Sandbox Code Playgroud)
正如你所看到的,它methodData是空的。
我完全不了解 java(因此我使用 Capacitor),但这是我能找到的唯一一段看起来远程相关的代码,android\src\main\java\GameServices.java在 GitHub 链接中。
@PluginMethod()
public void showLeaderboard(final PluginCall call) {
final String leaderboardId = call.getString("leaderboardId");
if (leaderboardId == …Run Code Online (Sandbox Code Playgroud)