测试应用内更新
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本指南介绍了如何在您的应用中测试应用内更新。
使用内部应用分享功能进行测试
您可以使用内部应用分享功能测试应用内更新,具体执行步骤如下所示:
确保您的测试设备安装了支持应用内更新的应用版本,且应用是使用内部应用分享网址安装的。
按照 Play 管理中心内的说明在内部分享应用。上传应用的某个版本,其版本号应高于测试设备上所安装的应用。
在测试设备上,点击更新后的应用版本对应的内部应用分享链接,但请勿从点击该链接后显示的 Play 商店页面安装应用。
从设备的应用抽屉或主屏幕打开应用。更新现在应可供您的应用使用,您可以测试应用内更新的实现。
问题排查
本部分介绍了当应用内更新在测试期间可能无法按预期运行时的一些可行性解决方案:
只有拥有应用的用户账号可以使用应用内更新。因此,在使用账号测试应用内更新之前,请确保您目前使用的账号至少从 Google Play 下载过一次应用。
确保您用于测试应用内更新的应用与 Google Play 中提供的应用版本具有相同的应用 ID 和签名密钥。
Google Play 只能将应用更新到更高版本。因此,请确保您要测试的应用的版本号低于更新后的版本号。
将应用上传到内部应用分享渠道时,不支持 inAppUpdatePriority
字段。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Test in-app updates\n\nThis guide describes how to test [in-app\nupdates](/guide/playcore/in-app-updates) in your app.\n\nTest with internal app sharing\n------------------------------\n\nUse [internal app\nsharing](https://support.google.com/googleplay/android-developer/answer/9844679)\nto test in-app updates by performing the following steps:\n\n1. Make sure your test device has a version of your app installed that supports\n in-app updates and was installed using an internal app sharing URL.\n\n2. Follow the Play Console instructions to\n [share your app internally](https://support.google.com/googleplay/android-developer/answer/9844679).\n Upload a version of your app that uses a version code that is higher than the\n one you already have installed on the test device.\n\n3. On the test device, click the internal app sharing link for the updated\n version of your app but *do not* install the app from the Play Store page\n that appears after you click the link.\n\n4. Open the app from the device's app drawer or home screen. The update should\n now be available to your app, and you can test your implementation of in-app\n updates.\n\nTroubleshoot\n------------\n\nThis section describes some possible solutions to situations where in-app\nupdates might not work as expected during testing:\n\n- In-app updates are only available to user accounts that own the app. Make\n sure the account that you're using has downloaded your app from Google Play at\n least once before using the account to test in-app updates.\n\n- Make sure that the app that you are using to test in-app updates has the same\n [application ID](/studio/build/configure-app-module#set_the_application_id) and [signing\n key](/studio/publish/app-signing) as the version available from Google Play.\n\n- Google Play can only update an app to a higher version code. Make sure that\n the app that you are testing has a lower version code than the update version\n code.\n\n- The `inAppUpdatePriority` field is not supported when uploading your app to internal app sharing."]]