首页 > 解决方案 > Firebase 应用分发不适用于 Codemagic

问题描述

我已经为我的 Flutter 项目设置了 Firebase App Distribution,它在本地运行良好。但是,如果我尝试在 Codemagic 上运行它,我会收到以下错误:

错误:未能获取应用信息。HTTP 错误:403,Firebase App Distribution API 之前未在项目 XXX 中使用或已禁用。通过访问https://console.developers.google.com/apis/api/firebaseappdistribution.googleapis.com/overview?project=XXX启用它,然后重试。如果您最近启用了此 API,请等待几分钟让该操作传播到我们的系统并重试。

XXX 是项目 ID 的占位符。但是我没有那个我的项目。如果我打开网址,我会收到一条消息,说我不合理。

这是我的快车道命令:

  lane :deploy_dev_firebase do
      firebase_app_distribution(
          app: "***330f",
          testers: "***@gmail.com",
          release_notes: "release",
          firebase_cli_path: "/usr/local/bin/firebase",
          apk_path: "../build/app/outputs/apk/dev/release/app-dev-release.apk"
      )
  end

还有我的 codemagic Post-build 脚本:

#!/bin/bash

gem install bundler

cd android

bundle install

bundle exec fastlane deploy_dev_firebase

标签: flutterfirebase-app-distributioncodemagic

解决方案


推荐阅读