此页面提供疑难解答帮助以及有关使用 App Distribution 分发和测试应用程序的常见问题解答。
分发应用程序
使用以下提示解决您在向测试人员分发应用程序时可能遇到的问题。
上传应用程序时,您可能会遇到此错误:
“我们找不到应用<app-id>
的联系电子邮件。请访问 Firebase 控制台中的 App Distribution 进行设置。”
如果可用,请在 Firebase 控制台中设置联系人电子邮件。如果问题仍然存在,请联系Firebase 支持。
如果您在配置过程中反复遇到错误 400、409 或 500,请联系Firebase 支持。向支持人员提供您的 Firebase 项目编号和应用程序标识符。
验证 APK 的大小。所有二进制文件的最大文件大小限制为 2048 MiB,略高于 2 GB。
如果 APK 大小在文件大小限制内并且可以重现,请联系Firebase 支持。
使用以下内容验证 APK 是否已签名:
apksigner verify --verbose ~/app-distro/app-distro-apps/[path_name]/app/ build/outputs/apk/debug/app-debug.apk
分发 Android App Bundle (AAB)
当您将 AAB 上传到 App Distribution 时,Google Play 会使用测试应用签名密钥证书自动重新生成生成的 APK。出现提示时,如果您想继续使用他们的第三方服务,您必须向 API 提供商注册您的应用程序。签名后,您的应用程序的测试证书可以在 Firebase 控制台中查看。
您上传到 App Distribution 的 AAB 构建不会出现在您的 Google Play 开发者帐户中(这包括 App Bundle Explorer 和内部应用共享)。
如果 Firebase Android 应用程序与 Google Play 取消链接,则会发生以下情况:
您将无法通过 App Distribution 与 Google Play 的集成将新的应用程序包上传到 App Distribution 并导出到 Google Play。
现有构建将继续在 Firebase App Distribution 仪表板和您的测试人员中可用。
之前在 Firebase 和 Google Play 之间导出的任何数据仍可在这两种产品中访问。
要通过 App Distribution 分发 Android App Bundle (AAB) 并将上传的 AAB 自动链接到您的 Firebase 项目和您的 Google Play 开发者帐户,请确保您满足以下要求:
您的 Google Play 开发者帐户具有以下访问级别之一:所有者或管理员。
对于您的 Firebase 项目,您具有以下角色之一: Owner或Firebase Admin 。
您的应用已在 Firebase 和您的 Google Play 开发者帐户中注册。这意味着您同时拥有 Firebase Android 应用和 Google Play 应用。
Google Play 中的应用程序和 Firebase Android 应用程序都使用相同的包名注册。
Google Play 中的应用程序在应用程序仪表板上设置,并分发到 Google Play 轨道之一(内部测试、封闭测试、开放测试或生产)。
应用在 Google Play 中的审核已完成,应用已发布。如果应用程序状态列显示以下状态之一,则您的应用程序已发布:内部测试(不是草稿内部测试)、封闭式测试、开放式测试或生产。
如果您上传的应用以前不符合上面列出的链接条件,但现在满足了,您可以重新尝试将您的 Firebase Android 应用链接到 Google Play 。
安装和测试应用程序
使用以下提示解决测试人员在安装和测试您的应用程序时可能遇到的问题。
当用户创建 Google 帐户时,他们会自动收到一个 Gmail 地址。
如果测试人员没有 Google Workspace 或 Gmail 地址,或者他们更愿意使用其他电子邮件地址登录,请要求测试人员将非 Gmail 电子邮件地址链接到该帐户并使用该电子邮件地址登录。
选择备用电子邮件时,测试人员必须遵循以下准则:
- 不要使用 Gmail 地址。
- 不要使用已经关联到其他 Google 帐户的电子邮件地址。
- 使用此电子邮件地址登录时,请记住使用您的 Google 帐户密码。
有关详细信息,请参阅使用其他电子邮件地址登录您的 Google 帐户。
如果测试人员使用与发送邀请的电子邮件地址不同的电子邮件地址接受了电子邮件邀请,则测试人员可能无法看到正确的应用程序或构建。
开发人员发送邀请并添加到新构建的电子邮件(电子邮件 A)可以不同于测试人员用来接受邀请的电子邮件(电子邮件 B)。这会在幕后创建一个链接。每当将电子邮件 A 添加到新构建中时,实际上是电子邮件 B 获得了访问权限。
如果测试人员接受了具有不同电子邮件地址的电子邮件邀请,请按照以下步骤解决问题:
从 Firebase 控制台的 App Distribution 页面的Testers & Groups选项卡中删除测试人员。现有邀请将被删除。
重新邀请测试人员测试您的应用。测试人员应该会收到一封邀请电子邮件。
确保测试人员接受具有相同电子邮件地址的邀请。
如果发生以下情况之一,测试人员可能收不到电子邮件通知:
电子邮件通知被发送到垃圾邮件文件夹。
电子邮件过滤器已设置。
邀请被发送到一个电子邮件帐户,但测试人员接受了另一个电子邮件帐户。测试人员收到最初发送邀请的电子邮件帐户的新发布电子邮件。
测试人员之前收到过邀请,但没有接受初始邀请。如果测试人员被添加到后续版本,App Distribution 不会自动向该测试人员发送发布通知,因为测试人员未接受初始邀请。
解决方案 1
让测试人员检查他们的垃圾邮件文件夹和他们在电子邮件服务中设置的任何电子邮件过滤器。
如果测试人员取消订阅电子邮件,请要求测试人员执行以下操作:
- 查找测试人员之前从应用程序收到的电子邮件。
- 单击底部的管理电子邮件设置,然后单击允许电子邮件重新订阅。
方案二
从 Firebase 控制台的 App Distribution 页面的Testers & Groups选项卡中删除测试人员。此操作删除现有邀请。
重新邀请测试人员测试您的应用。测试人员应该会收到一封邀请电子邮件。确保测试人员接受邀请时使用的电子邮件地址与收到邀请的电子邮件地址相同。
如果测试人员下载并安装了一个版本,但应用详细信息用户界面未显示该应用已安装,这是一个已知问题。在某些情况下,Firebase 应用中的捆绑包 ID 与 APK 的捆绑包 ID 不匹配。
验证 APK 的捆绑 ID 是否与您用于上传分发的 Firebase 应用的捆绑 ID 匹配。
如果您正在运行的应用程序或浏览器尚未获得在 Google Play 之外安装应用程序的权限,则会出现 Android 警报。授予权限:
Android 版本 8 或更高版本:在“设置”应用中,点按“允许来自此来源”。
Android 版本 7 或更早版本:在“设置”应用中,点击“安全”并选择“未知来源” 。出现提示时,点击确定>信任。
如果测试 APK 无法安装到测试人员的设备上:
- 验证新版本中的证书是否与测试人员设备上安装的版本中的证书相匹配。 Android 系统仅在证书匹配时才允许应用更新。要了解更多信息,请参阅签名注意事项。
- 确保应用程序支持测试设备的操作系统版本(检查
minSdkVersion
)。
如果 App Tester 应用阻止您登录并将您重定向回登录屏幕,则您可能正在使用包含限制设置的 Google Workspace(以前称为 GSuite)。
要删除您的限制设置:
在您的 Google Workspace 的Apps选项卡中,确保 Firebase App Distribution未设置为Access: Blocked 。
在Services选项卡中,确保Cloud Platform不受限制。
删除设置后,请尝试重新登录。
当正在安装的应用程序与设备上已安装的应用程序发生冲突时,可能会发生此错误。例如,它可能是具有相同自定义权限或ContentProvider name的同一应用程序的不同变体。
您可以要求测试人员在遇到问题后立即收集错误报告,并检查报告以获取有关原因的更多信息。测试人员必须先删除任何有冲突的应用程序,然后才能安装新应用程序。
当您遇到 403 错误时,这意味着您使用的帐户没有安装和测试应用程序的权限。访问权限由您在 Google Workspace 中的帐号所在域的管理员决定。
如果您认为自己应该有权安装和测试应用,请让您的 Google Workspace 帐号管理员更改您的帐号设置。您的管理员应按照管理对不受单独控制的服务的访问中的说明进行操作。
如果您有多个帐户,请尝试使用不受安装和测试应用程序限制的其他帐户登录。
使用 App Distribution Android SDK 启用应用内提醒
使用以下提示解决涉及使用 App Distribution Android SDK 启用应用内新构建警报的问题。
如果您已经在您的应用中设置了 App Distribution Android SDK,并且您的测试人员没有收到应用内提醒,请按照以下步骤操作:
通过将
OnFailureListener
附加到 Firebase App Distribution API 返回的任务来检查错误消息。爪哇
firebaseAppDistribution.updateIfNewReleaseAvailable().addOnFailureListener ( e -> { if (e instanceof FirebaseAppDistributionException) { // Log exception here }});
科特林
firebaseAppDistribution.updateIfNewReleaseAvailable().addOnFailureListener { e -> if (e is FirebaseAppDistributionException) { // Log exception here } }
检查测试人员是否有权访问新版本:
在您的应用中启用调试模式。要了解如何操作,请参阅Google Analytics 文档。
在模拟器中运行您的应用并搜索字符串“FirebaseAppDistribution”。
如果日志表明未找到版本,或者测试人员没有访问权限,则您的测试人员可能尚未与新版本相关联。
在 Firebase 控制台的 App Distribution 仪表板中,确保您的测试人员包含在您的构建分发中并且处于已接受状态。
如果您的测试人员仍未收到提醒,请让他们按照以下提示进行操作,以确保他们接受了测试您应用的邀请并正确设置了他们的测试设备:
在测试设备上,通过 App Tester 或通过测试器网络应用程序登录 Firebase App Distribution。请记住选择您接受测试应用程序邀请时首次使用的 Google 帐户。
检查以确保新的应用程序版本在 App Tester 或测试器网络应用程序中可用。
默认情况下,您的测试人员只需登录他们的 Google 帐户一次即可启用新版本更新并安装新版本。如果您的测试人员在关闭并重新打开您的应用程序后被提示再次登录,请按照以下提示操作以确保您的 App Distribution 配置设置正确:
检查以确保您已启用 Firebase App Testers API。有关详细信息,请参阅启用 App Distribution Tester API 。
在Key restrictions下,确保 Firebase App Testers API 包含在允许的 API 列表中。
如果您通常在注销时清除 SharedPreferences,您可能正在清除测试仪的状态。 App Distribution 存储一个标志,指示您的测试人员是否已经登录到该应用程序。有关更多信息,请参阅GitHub 存储库。
经常问的问题
Firebase App Distribution 具有以下测试人员限制:
最多可向一个 Firebase 项目添加 500 名测试人员
最多可向 App Distribution 组添加 200 名测试人员
要添加更多测试人员,请请求免费增加限制。
测试人员有 30 天的时间接受邀请,在邀请到期前测试该应用。当邀请还有 5 天到期时,Firebase 控制台中发布的测试人员旁边会显示到期通知。可以通过测试人员行上的下拉菜单重新发送邀请来更新邀请。
如果出现以下情况之一,应用程序版本将从应用程序分发中删除:
- 应用程序版本早于 150 天。
- 您超过了 1,000 个应用程序版本限制,并且该应用程序版本早于最近的 1,000 个应用程序版本。
有关详细信息,请参阅App Distribution 最多支持 1,000 个版本。
在应用达到或超过 150 天到期限制或 1,000 次发布限制后,该发布将从 App Distribution 仪表板和 Firebase App Tester 应用中删除。如果您的测试人员已安装该版本,则该应用程序的本地版本将继续运行。
要使应用版本的可用时间更长,请使用以下建议之一:
- 在应用发布到期或超过发布限制之前,下载 APK 或 AAB 并从应用分发仪表板中删除发布。然后,将 APK 或 AAB 作为新版本重新上传到 App Distribution。
- 下载版本并将其上传到Cloud Storage以进行长期存档。
应用程序版本在 150 天后过期
当您将应用程序的版本上传到 Firebase 时,该版本会在App Distribution 仪表板中显示 150 天,从上传日期算起。上传版本后,您可以将其分发给测试人员,测试人员在其测试设备上安装 Firebase App Tester 应用中的版本。
当发布距离到期日期还有 30 天时,应用发布到期通知会出现在 Firebase App Tester 应用中的发布上。
App Distribution 最多支持 1,000 个版本
App Distribution 允许每个应用最多发布 1,000 个版本。当您的应用程序达到 1,000 个应用程序版本限制时,App Distribution 会自动删除超出限制的最旧版本。
如果您想手动管理应用版本,请使用 App Distribution REST API 批量列出和删除应用版本。
如有疑问,请联系Firebase 支持。
如果您是测试人员,我们建议您下载Firebase App Tester ,这是一款可让您在一个地方访问所有测试构建的应用程序。
要删除您的 App Distribution 测试员帐户及其关联数据,请按顺序执行以下步骤:
访问https://appdistribution.firebase.google.com并使用您的 Google 帐户登录。
在右上角,单击
(管理帐户)删除帐户。
可选:在您的Google 帐户权限中,撤销 Firebase App Distribution 的访问权限。请注意,在未先删除您的 App Distribution 帐户的情况下撤销访问权限不会删除您的测试员帐户或数据。
此页面提供疑难解答帮助以及有关使用 App Distribution 分发和测试应用程序的常见问题解答。
分发应用程序
使用以下提示解决您在向测试人员分发应用程序时可能遇到的问题。
上传应用程序时,您可能会遇到此错误:
“我们找不到应用<app-id>
的联系电子邮件。请访问 Firebase 控制台中的 App Distribution 进行设置。”
如果可用,请在 Firebase 控制台中设置联系人电子邮件。如果问题仍然存在,请联系Firebase 支持。
如果您在配置过程中反复遇到错误 400、409 或 500,请联系Firebase 支持。向支持人员提供您的 Firebase 项目编号和应用程序标识符。
验证 APK 的大小。所有二进制文件的最大文件大小限制为 2048 MiB,略高于 2 GB。
如果 APK 大小在文件大小限制内并且可以重现,请联系Firebase 支持。
使用以下内容验证 APK 是否已签名:
apksigner verify --verbose ~/app-distro/app-distro-apps/[path_name]/app/ build/outputs/apk/debug/app-debug.apk
分发 Android App Bundle (AAB)
当您将 AAB 上传到 App Distribution 时,Google Play 会使用测试应用签名密钥证书自动重新生成生成的 APK。出现提示时,如果您想继续使用他们的第三方服务,您必须向 API 提供商注册您的应用程序。签名后,您的应用程序的测试证书可以在 Firebase 控制台中查看。
您上传到 App Distribution 的 AAB 构建不会出现在您的 Google Play 开发者帐户中(这包括 App Bundle Explorer 和内部应用共享)。
如果 Firebase Android 应用程序与 Google Play 取消链接,则会发生以下情况:
您将无法通过 App Distribution 与 Google Play 的集成将新的应用程序包上传到 App Distribution 并导出到 Google Play。
现有构建将继续在 Firebase App Distribution 仪表板和您的测试人员中可用。
之前在 Firebase 和 Google Play 之间导出的任何数据仍可在这两种产品中访问。
要通过 App Distribution 分发 Android App Bundle (AAB) 并将上传的 AAB 自动链接到您的 Firebase 项目和您的 Google Play 开发者帐户,请确保您满足以下要求:
您的 Google Play 开发者帐户具有以下访问级别之一:所有者或管理员。
对于您的 Firebase 项目,您具有以下角色之一: Owner或Firebase Admin 。
您的应用已在 Firebase 和您的 Google Play 开发者帐户中注册。这意味着您同时拥有 Firebase Android 应用和 Google Play 应用。
Google Play 中的应用程序和 Firebase Android 应用程序都使用相同的包名注册。
Google Play 中的应用程序在应用程序仪表板上设置,并分发到 Google Play 轨道之一(内部测试、封闭测试、开放测试或生产)。
应用在 Google Play 中的审核已完成,应用已发布。如果应用程序状态列显示以下状态之一,则您的应用程序已发布:内部测试(不是草稿内部测试)、封闭式测试、开放式测试或生产。
如果您上传的应用以前不符合上面列出的链接条件,但现在满足了,您可以重新尝试将您的 Firebase Android 应用链接到 Google Play 。
安装和测试应用程序
使用以下提示解决测试人员在安装和测试您的应用程序时可能遇到的问题。
当用户创建 Google 帐户时,他们会自动收到一个 Gmail 地址。
如果测试人员没有 Google Workspace 或 Gmail 地址,或者他们更愿意使用其他电子邮件地址登录,请要求测试人员将非 Gmail 电子邮件地址链接到该帐户并使用该电子邮件地址登录。
选择备用电子邮件时,测试人员必须遵循以下准则:
- 不要使用 Gmail 地址。
- 不要使用已经关联到其他 Google 帐户的电子邮件地址。
- 使用此电子邮件地址登录时,请记住使用您的 Google 帐户密码。
有关详细信息,请参阅使用其他电子邮件地址登录您的 Google 帐户。
如果测试人员使用与发送邀请的电子邮件地址不同的电子邮件地址接受了电子邮件邀请,则测试人员可能无法看到正确的应用程序或构建。
开发人员发送邀请并添加到新构建的电子邮件(电子邮件 A)可以不同于测试人员用来接受邀请的电子邮件(电子邮件 B)。这会在幕后创建一个链接。每当将电子邮件 A 添加到新构建中时,实际上是电子邮件 B 获得了访问权限。
如果测试人员接受了具有不同电子邮件地址的电子邮件邀请,请按照以下步骤解决问题:
从 Firebase 控制台的 App Distribution 页面的Testers & Groups选项卡中删除测试人员。现有邀请将被删除。
重新邀请测试人员测试您的应用。测试人员应该会收到一封邀请电子邮件。
确保测试人员接受具有相同电子邮件地址的邀请。
如果发生以下情况之一,测试人员可能收不到电子邮件通知:
电子邮件通知被发送到垃圾邮件文件夹。
电子邮件过滤器已设置。
邀请被发送到一个电子邮件帐户,但测试人员接受了另一个电子邮件帐户。测试人员收到最初发送邀请的电子邮件帐户的新发布电子邮件。
The tester was previously invited but did not accept the initial invitation. If the tester is added to subsequent releases, App Distribution won't automatically send release notifications to that tester because the tester didn't accept the initial invitation.
Solution 1
Ask the tester to check their spam folder and any email filters they set in their email service.
If the tester unsubscribed from the emails, ask the tester to do the following:
- Find an email that the tester previously received from the app.
- Click Manage email settings at the bottom and click Allow emails to resubscribe.
Solution 2
Delete the tester from the Testers & Groups tab in the App Distribution page in the Firebase console. This action removes existing invitations.
Re-invite the tester to test your app. The tester should receive an invitation email. Make sure that the tester accepts the invitation with the same email address that the invitation was sent to.
If a tester downloads and installs a release but the app details user interface does not show that the app is installed, this is a known issue. In some cases, the bundle ID in the Firebase app does not match the bundle ID of the APK.
Verify that the bundle ID of the APK matches the bundle ID of the Firebase app you used to upload the distribution.
The Android alert appears if your running app or browser hasn't yet been given permission to install apps outside of Google Play. To grant permission:
Android version 8 or later : In the Settings app, tap Allow from this source .
Android version 7 or earlier : In the Settings app, tap Security and select Unknown sources . When the prompt appears, tap OK > Trust .
If a test APK fails to install on a tester's device:
- Verify that the certificate(s) in the new version match those in the version installed on the tester's device. The Android system only allows the app to update if the certificates match. To learn more, see Signing considerations .
- Ensure that the OS version of the tester device is supported by the app (check the
minSdkVersion
).
If the App Tester app prevents you from signing in and redirects you back to the signin screen, you may be using a Google Workspace (formerly GSuite) that includes restriction settings.
To remove your restriction settings:
In the Apps tab of your Google Workspace, make sure Firebase App Distribution is not set to Access: Blocked .
In the Services tab , make sure Cloud Platform is unrestricted.
Once the settings are removed, try signing in again.
This error can happen when the app being installed conflicts with an app already installed on the device. For example, it could be a different variant of the same app with the same custom permission or ContentProvider name .
You can ask the tester to collect a bug report immediately after experiencing the issue, and inspect the report for more information about the cause. The tester must delete any conflicting apps before the new app can be installed.
When you encounter a 403 error, this means that the account you're using doesn't have permission to install and test apps. Access is determined by the administrator of your account's domain in Google Workspace.
If you believe you should have permission to install and test apps, ask your Google Workspace account admin to change your account settings. Your admin should follow the instructions in Manage access to services that aren't controlled individually .
If you have multiple accounts, try logging in with a different account that is not restricted from installing and testing apps.
Enabling in-app alerts with the App Distribution Android SDK
Use the following tips to troubleshoot issues that involve enabling in-app new build alerts using the App Distribution Android SDK.
If you have already set up the App Distribution Android SDK in your app and your testers aren't receiving in-app alerts, follow these steps:
Check for error messages by attaching an
OnFailureListener
to the Task returned by the Firebase App Distribution API.Java
firebaseAppDistribution.updateIfNewReleaseAvailable().addOnFailureListener ( e -> { if (e instanceof FirebaseAppDistributionException) { // Log exception here }});
Kotlin
firebaseAppDistribution.updateIfNewReleaseAvailable().addOnFailureListener { e -> if (e is FirebaseAppDistributionException) { // Log exception here } }
Check that the tester has access to the new release:
Enable debug mode in your app. To learn how, see the Google Analytics documentation .
Run your app in a simulator and search for the string "FirebaseAppDistribution".
If the logs indicate that no release was found, or that the tester does not have access, your tester may not yet be associated with the new release.
In the App Distribution dashboard of the Firebase console, make sure your tester is included in your build distribution and is in the Accepted state.
If your tester still isn't receiving alerts, have them follow the tips below to make sure they accepted the invitation to test your app and that they set up their testing device properly:
On the test device, sign into Firebase App Distribution via App Tester or via the tester web app. Remember to select the Google account you first used when you accepted the invitation to test the app.
Check to make sure the new app release is available in App Tester or the tester web app.
By default, your testers only need to sign in to their Google account once to enable new build updates and to install new builds. If your testers are being prompted to sign in again after closing and re-opening your app, follow these tips to make sure your App Distribution configuration is set up properly:
Check to make sure you've enabled the Firebase App Testers API. For more information, see Enable the App Distribution Tester API .
Under Key restrictions , make sure that the Firebase App Testers API is included in the list of allowed APIs.
If you typically clear SharedPreferences on logout, you may be clearing your tester's state. App Distribution stores a flag that indicates whether your tester has already signed into the app. For more information, see the GitHub repository .
Frequently asked questions
Firebase App Distribution has the following tester limits:
Add a maximum of 500 testers to a Firebase project
Add a maximum of 200 testers to an App Distribution group
To add more testers, request a no-cost limit increase .
Testers have 30 days to accept an invitation to test the app before it expires. When an invitation is 5 days from expiring, an expiration notice appears in the Firebase console next to the tester on a release. An invitation can be renewed by resending it via the drop-down menu on the tester row.
App releases are removed from App Distribution if one of the following conditions occurs:
- The app release is older than 150 days.
- You exceed the 1,000 app release limit, and the app release is older than the 1,000 most recent app releases.
For more information, see App Distribution supports a maximum of 1,000 releases .
After the app reaches or exceeds the 150-day expiration limit or the 1,000 release limit, the release is removed from the App Distribution dashboard and the Firebase App Tester app. If your tester has installed the release, the local version of the app continues to run.
To keep the app release available longer, use one of the following recommendations:
- Before the app release expires or exceeds the release limit, download the APK or AAB and delete the release from the App Distribution dashboard. Then, re-upload the APK or AAB as a new build to App Distribution.
- Download the release and upload it to Cloud Storage for long-term archiving.
App releases expire after 150 days
When you upload a release of your app to Firebase, the release appears in the App Distribution dashboard for 150 days, starting from the upload date. After you upload the release, you can distribute it to testers, who install the release from the Firebase App Tester app on their testing device.
When the release is 30 days from the expiration date, an app release expiration notification appears on your release in the Firebase App Tester app.
App Distribution supports a maximum of 1,000 releases
App Distribution allows a maximum of 1,000 releases per app. When your app reaches the 1,000 app release limit, App Distribution automatically deletes the oldest releases above the limit.
If you want to manually manage your app releases, use the App Distribution REST API to list and delete app releases in bulk.
If you have questions, contact Firebase Support .
If you're a tester, we recommend downloading Firebase App Tester , an app that lets you access all your test builds in one place.
To delete your App Distribution tester account and its associated data, follow these steps in order:
Visit https://appdistribution.firebase.google.com and sign in with your Google account.
In the top-right, click
( Manage account )Delete account .
Optional: In your Google account permissions , revoke access from Firebase App Distribution. Note that revoking access without first deleting your App Distribution account does not delete your tester account or data.