【问题标题】:Can't deploy Ionic app with Firebase No matching client found for package name无法使用 Firebase 部署 Ionic 应用程序找不到与包名称匹配的客户端
【发布时间】:2019-01-06 11:52:02
【问题描述】:

我用 firebase 创建了 ionic 3 应用程序

应用程序正确启动,并连接到firebase DB。并且可以执行CRUD操作。

当我使用命令部署应用程序时

$ ionic cordova build --release android

我收到错误消息:

No matching client found for package name 'io.ionic.starter'

注意:文件“google-services.json”丢失 而且我的应用程序没有显示在 Firebase 控制台中 pic

我在 app 模块中初始化 firebase:

// Initialize Firebase
var config = {
  apiKey: "AIzaSyDGJaayYxyasdufYG7GKo36nUMdsfU",
  authDomain: "firedo-3997a.firebaseapp.com",
  databaseURL: "https://firedo-3997a.firebaseio.com",
  projectId: "firedo-3997a",
  storageBucket: "firedo-3997a.appspot.com",
  messagingSenderId: "578088897558"
};
firebase.initializeApp(config);

请帮我部署这个应用程序

【问题讨论】:

  • 你添加了 google-service.json 文件吗???

标签: android firebase ionic-framework ionic3


【解决方案1】:

您需要从 firebase 将 google-services.json 文件添加到您的 ionic 项目的根文件中。 并且您必须在 config.xml 文件中使 config.xml 文件中的名称与您在 firebase 中的项目名称相同。

【讨论】:

    猜你喜欢
    • 2019-12-05
    • 2019-06-19
    • 1970-01-01
    • 2018-11-23
    • 2020-10-19
    • 1970-01-01
    • 2019-01-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多