适用于 Android 游戏的反盗版功能
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本指南介绍了如何使用反盗版功能保护您的 Android 游戏。
反盗版功能仅适用于 Android 游戏。如果您的游戏已启用反盗版功能,则 Google Play 游戏服务会检查用户是否拥有参与您的游戏的许可。如果设备上没有任何用户账号已获得参与您的游戏的许可,则您的游戏发送的 Google Play 游戏服务调用会失败并返回 LICENSE_CHECK_FAILED
状态代码。
要获得参与您的游戏的许可,用户必须从 Google Play 安装您的游戏。无论您的游戏是免费应用还是付费应用,系统都会进行许可检查。只有在游戏已发布的情况下,才会执行该检查。拥有测试账号的用户可以在不购买游戏的情况下玩游戏。
启用反盗版功能
如需为您的 Android 游戏启用反盗版功能,请按以下步骤操作:
如果您尚未将您的 Android 游戏添加到 Google Play 管理中心,请按照设置游戏中所述的步骤操作。
在 Google Play 管理中心内,打开游戏服务标签页,然后从列表中选择您的 Android 游戏。
打开关联应用标签页,然后选择您的现有 Android 游戏或链接到新 Android 游戏。
将启用反盗版功能选项设为开启。
点击保存并继续。
发布游戏以激活许可检查。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[],[],null,["# Anti-piracy for Android games\n\nThis guide describes how to use the anti-piracy feature to secure your\nAndroid games.\n\nThe anti-piracy feature is available for Android games only. If anti-piracy\nis turned on for your game, the Google Play Games Services checks if a user is licensed to\nplay your game. If none of the user accounts on a device are licensed for your\ngame, the Google Play Games Services calls sent by your game fail and return a\n`LICENSE_CHECK_FAILED` status code.\n\nTo be licensed for your game, users must install it from Google Play. The\nlicense checking takes place regardless of whether your game is a free or paid\napp. The checking is only performed if the game is published. Users with test\naccounts can play the game without purchasing it.\n\nEnable anti-piracy\n------------------\n\nTo turn on the anti-piracy feature for your Android game:\n\n1. Follow the steps described in\n [Set Up Your Game](/games/pgs/console/enable-features) to add your Android game\n to the Google Play Console, if you have not done so already.\n\n2. In the Google Play Console, open the **Games services** tab, then\n select your Android game from the list.\n\n3. Open the **Linked apps** tab, then select your existing Android game or\n link to a new Android game.\n\n4. Turn the **Enable anti-piracy** option to **ON**.\n\n5. Click **Save and continue**.\n\n6. Publish your game in order for license checking to be\n activated."]]