发布到 Google Play

Qt for Android provides a complete solution to develop, build, and package your applications for Android. Most of these tasks, especially packaging and deployment are handled by Qt Creator providing rich developer experience.

Every time you run the application using Qt Creator, an Android Application Package (APK) is created and deployed onto the target (device or emulator) you choose. With some minor changes to how the .apk is created, you can publish your application on Google Play and monetize. The following step-by-step instructions guide you to create an .apk that can go live on Google Play:

  1. Open your application project using Qt Creator v3.0 or later and change its 构建 settings to build release version.
  2. 选择 Create Templates under 构建 settings to create the template files such as AndroidManifest.xml and other resources.

    注意: You can edit the AndroidManifest.xml in 一般 or XML Source 模式。

  3. Check for the following in AndroidManifest.xml :
    • Minimum required SDK is set to API 9 or later.

      注意: Qt Quick Controls with native Android style require API 11 (Android v3.0) or later.

    • 添加 应用程序名称 and Application icon .
    • 权限 list has all the required permissions.
    • 特征 list has the software or hardware features that your application depends on. For example, NFC.

    注意: Qt adds the default permissions and features based on the module dependencies of your application. If you do not want these default permissions and features, remove the <!-- %%INSERT_PERMISSIONS --> and <!-- %%INSERT_FEATURES --> comments from AndroidManifest.xml . For information on the manifest XML format, see Android: App Manifest .

  4. 设置 keystore to sign the .apk . You can create a new keystore if you do not have one. For more details, see QtCreator: Specifying Settings for Packages .
  5. 选择 Open package location after build and run your application to build the .apk . Qt Creator builds the .apk and opens the folder containing the .apk .
  6. Log in to the Google Play Developer Console and upload the .apk file, few screen captures of the application, and a description.

Now your application is available to other Android device users via Google Play. You can also choose to publish the application to a smaller group, so that you can test and improve the application before publishing it to a larger audience.

在 Android 部署应用程序 for more information about how the packaging is done and how you can influence it.

版权所有  © 2014-2025 乐数软件    

工业和信息化部: 粤ICP备14079481号-1