验证、打包和发布 APK
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
按照本页说明将经验证的 APK 上传到 Google Play。
验证 proto 文件
将以下文件放到 assets/tuningfork
下的 APK 资源文件夹中:
dev_tuningfork.proto
tuningfork_settings.txt
- 几个
dev_tuningfork_fidelityparams_i.txt
文件,按保真度递增排序
验证工具会在 assets/tuningfork
目录中生成设置文件和默认保真度参数文件的二进制 (.bin
) 序列化协议缓冲区文件。该工具本身位于 src/tuningfork/tools/validation
目录中。
验证工具会生成二进制文件
运行以下命令以验证示例项目。根据您的操作系统 (LOCAL_OS
) 使用以下各项中的一项替换:
cd gamesdk/src/tuningfork/tools/validation
java -jar build/libs/TuningforkApkValidationTool.jar \
--tuningforkPath ../../../../samples/tuningfork/insightsdemo/app/src/main/assets/tuningfork \
--protoCompiler ../../../../third_party/protobuf-3.0.0/install/LOCAL_OS/bin/protoc
输出的结束部分类似如下:
...
May 19, 2020 3:42:11 PM com.google.tuningfork.validation.TuningforkApkValidationTool main
INFO: Tuning Fork settings are valid
如需详细了解如何运行验证工具,请参阅 validation tool README
。
查看集成核对清单
在将 APK 上传到 Google Play 管理中心之前,请执行以下操作:
上传和发布
如需接收性能分析数据,请将新 APK 上传到 Google Play 管理中心并创建版本。您可在 Google Play 上将该版本发布至测试轨道或发布至整个用户群。如需详细了解如何创建版本,请参阅管理中心帮助中心文档。
发布 APK 后,您可以在 Google Play 管理中心内的 Android Vitals > Performance > Insights 下接收来自用户的新性能分析数据。如需了解详情,请参阅性能分析数据文档。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-01。
[null,null,["最后更新时间 (UTC):2025-08-01。"],[],[],null,["# Validate, package, and publish the APK\n\nUse the instructions on this page to upload a validated APK to Google Play.\n\nValidate the proto files\n------------------------\n\nPlace the following files in your APK assets folder under `assets/tuningfork`:\n\n- `dev_tuningfork.proto`\n- `tuningfork_settings.txt`\n- Several `dev_tuningfork_fidelityparams_`\u003cvar translate=\"no\"\u003ei\u003c/var\u003e`.txt` files, in increasing fidelity order\n\nThe validation tool generates binary (`.bin`) serialized protocol buffers of the\nsettings and default fidelity parameters files in the `assets/tuningfork`\ndirectory. The tool itself is located in the `src/tuningfork/tools/validation`\ndirectory.\n\n\nThe validation tool generates binary files\n\nRun the following commands to validate the sample project. Substitute one of the\nfollowing for your operating system (`LOCAL_OS`):\n\n- `mac`\n- `win`\n- `linux-x86`\n\n cd gamesdk/src/tuningfork/tools/validation\n java -jar build/libs/TuningforkApkValidationTool.jar \\\n --tuningforkPath ../../../../samples/tuningfork/insightsdemo/app/src/main/assets/tuningfork \\\n --protoCompiler ../../../../third_party/protobuf-3.0.0/install/\u003cvar translate=\"no\"\u003eLOCAL_OS\u003c/var\u003e/bin/protoc\n\nOutput ending in the following appears: \n\n ...\n\n May 19, 2020 3:42:11 PM com.google.tuningfork.validation.TuningforkApkValidationTool main\n INFO: Tuning Fork settings are valid\n\nFor more information on running the validation tool, see the\n[`validation tool README`](https://android.googlesource.com/platform/frameworks/opt/gamesdk/+/refs/heads/master/src/tuningfork/tools/validation).\n\nReview the integration checklist\n--------------------------------\n\nBefore uploading your APK to the Google Play Console, do the following:\n\n- Review and, if necessary, update your app's [Privacy Policy](/games/sdk/performance-tuner/custom-engine/enable-api#privacy)\n- Integrate the [Android Frame Pacing library](/games/sdk/frame-pacing) into your project\n- Provide [fidelity parameters](/games/sdk/performance-tuner/custom-engine/define-parameters#annotations-and-fidelity-parameters) and all of your app's [quality levels](/games/sdk/performance-tuner/custom-engine/define-parameters#define-quality-levels)\n- Record when your game is performing [loading events](/games/sdk/performance-tuner/custom-engine/loading-functions)\n- Successfully run the [validation tool](#validate)\n- Run your game in debug mode and validate the output using `logcat` or the Tuning Fork Monitor app\n- Confirm that you and other relevant game engineers have access to Android Vitals in the Google Play Console\n\nUpload and publish\n------------------\n\nTo receive performance insights, upload your new APK to the\nGoogle Play Console and create a release. You can release on Google Play to\ntest tracks or to your entire user base. For more information on creating a\nrelease, see the\n[Console Help Center documentation](https://support.google.com/googleplay/android-developer/answer/7159011).\n\nOnce you have published your APK, you can receive new performance insights from\nyour users in the Google Play Console under **Android Vitals \\\u003e Performance \\\u003e\nInsights** . For more information, see the\n[Performance insights documentation](https://support.google.com/googleplay/android-developer/answer/9876283)."]]