android - 授权 Android 游戏 - 应用程序 ID 在哪里?

标签 android google-play-services

我正在尝试授权我的 Android 游戏使用 Google Play 服务,以便能够使用排行榜等。

现在当点击授权应用时,什么都不会发生。在信息页面上,谷歌告诉我做以下事情:

enter image description here

我将指定我的应用程序 ID,但是我从哪里得到这个“app_id”?还有成就id?排行榜 ID?

这个 ids.xml 应该是什么样子的?

有什么想法吗?

最佳答案

在“排行榜”或“成就”页面的底部有一个标记为“获取资源”的便捷链接。这将打开一个看起来像这样的页面:

<?xml version="1.0" encoding="utf-8"?>
 <!--
Google Play game services IDs.
Save this file as res/values/games-ids.xml in your project.
-->
<resources>
  <string name="app_id">00000000000</string>
  <string name="achievement_xxx">0000000000</string>
  <string name="achievement_yyy">0000000000</string>
 <string name="leaderboard_xxx">000000000000</string>
</resources>

请注意,系统会指示您将其放入名称非法的文件“games-ids.xml”中。 Eclipse 不允许您在文件名中使用破折号,因此要么将其放入您的“strings.xml”文件中,要么按照您的计划使用“ids.xml”作为文件名,我发现两者都有效。

关于android - 授权 Android 游戏 - 应用程序 ID 在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22173316/

相关文章:

android - 代码需要 API 级别 11(当前为 8)

android - isGooglePlayServicesAvailable 始终返回 2

安卓应用内订阅 : Inventory call returns purchase as null even if purchase exists

android - 使用 Gradle for Android 进行多项目设置

android - 升级 Google Play Services 7.5.0 后 RatingBar 颜色显示为白色

java - 与谷歌即时游戏和 com.google.gms.google-services 插件冲突

java - android studio中的 "Throwable Result Of Method Call Ignored"是什么?

android - 从相机预览中丢帧

java - 安卓工作室 : How to prevent up button in toolbar from pushing child view to the right?

java - Android:将textView放在ListView下面