【问题标题】:Adding Google Play Game Services to existing app将 Google Play 游戏服务添加到现有应用程序
【发布时间】:2021-06-17 13:23:19
【问题描述】:

我们已经在应用所有应用列表下发布了一个应用/游戏作为普通应用,现在我们想添加 Play 游戏服务登录以让用户保存游戏进度。

查看文档后,我们了解到我们需要在需要添加凭据和发布游戏的应用程序下设置Play Game Services。所以我们担心的是它会在 Playstore 上创建一个新应用还是只在 Google Games 中发布?

在已发布的现有应用中添加 Play 游戏登录的正确方法是什么?

【问题讨论】:

    标签: android google-play-services google-play-games


    【解决方案1】:

    Setting Up Google Play Games Services

    在第 2 步选择:“是的,我的游戏已经使用 Google API”。

    它需要这些依赖:

    implementation "com.google.android.gms:play-services-base:17.6.0"
    implementation "com.google.android.gms:play-services-auth:19.0.0"
    implementation "com.google.android.gms:play-services-games:21.0.0"
    

    以及 res/values/ids.xml(来自 Google Play 控制台)和 AndroidManifest.xml 已编辑:

    <application
        ...>
    
        <meta-data
            android:name="com.google.android.gms.games.APP_ID"
            android:value="@string/app_id" />
    
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version"/>
    
        ...
    
    </application>
    

    也解释了here

    【讨论】:

    • 我已完成所有操作,但在使用快照时仍然出现此错误“如果未在 Play 控制台中启用“已保存游戏”功能,则无法使用快照”我已多次检查已启用已保存游戏选项在控制台上。
    猜你喜欢
    • 2015-07-28
    • 1970-01-01
    • 2014-06-21
    • 2014-02-02
    • 1970-01-01
    • 1970-01-01
    • 2019-08-13
    • 1970-01-01
    相关资源
    最近更新 更多