在 Google Play 中注册产品

Google Play 市场允许您在不发布应用程序的情况下,注册您的应用程序以及您希望向其提供的应用程序内产品。本指南将简要介绍如何将应用程序上传到 Google Play 和注册产品。

准备提交应用程序

在将应用程序上传到 Google Play 之前,必须做好提交准备。

添加 Manifest XML

Qt XML 为应用程序生成的默认AndroidManifest.xml 适合开发测试,但在向 Google Play 提交应用程序时不能使用。

点击Qt Creator 中的Create Templates 按钮,创建你自己的清单。你可以在Projects >Build 标签下找到该按钮。展开Build Android APK 查看。

清单添加到项目后,就可以对其进行修改。最重要的部分是application namepackage name 。软件包名称必须是唯一的,建议遵循com.mycompany.myappname命名约定。com.mycompany "命名空间基于互联网域名所有权,以避免与其他应用程序发生命名冲突。

清单的其他重要部分包括versionCode ,每次上传应用程序的新版本时都必须递增。其他属性将决定应用程序软件包在商店列表中的显示方式,如application nameversion name

有关AndroidManifest.xml 的更多信息,请参阅Android 文档

更多信息,请参阅第三方 Android 库

签署应用程序

Qt 使用默认调试密钥签署应用程序,以便在设备上运行应用程序。同一密钥不能用于签署要在 Google Play 上发布的 Android 应用程序包。

请参阅签署 Android 软件包

注册应用程序

准备好发布应用程序后,就可以在 Google Play 中创建一个列表。

如果你还没有发布者账户,第一步就是获得一个。访问Google Play 开发者控制台,使用您选择的 Google 账户登录,然后按照指示步骤操作。

设置好账户后,点击 Google Play 开发者控制面板中的Add new application

在商店列表和Pricing and distribution 页面上尽可能多地填写信息。

发布应用程序

要在应用程序中测试应用内购买,首先必须发布应用程序。

请参阅发布应用程序

添加应用内产品

要在应用程序中访问应用内产品,必须在 Google Play 中注册。

请参阅创建和配置产品

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.