NS7 错误上的 Nativescript Firebase 插件存储功能

问题描述

升级到 NS7 并更新我的代码导入后,我无法使用 firebase 'firestore' 功能。每当调用任何 firebase 存储功能时,我都会收到: CONSOLE ERROR: ERROR TypeError: Cannot read property 'listAll' of undefined

一个应用程序能够成功使用firestore来检索集合和文档,但似乎无法识别存储功能

app.component.ts

import { firestore,storage } from "@nativescript/firebase";

 storage.listAll({
        bucket: "gs://appname-xxxx.appspot.com",remoteFullPath: ""
      }).then(
          function (result) {
              console.log(JSON.stringify(result));
          },function (error) {
              console.log(error);
          }
      );

firebase.nativescript.json

{
    "using_ios": true,"using_android": false,"analytics": true,"firestore": true,"realtimedb": false,"authentication": true,"remote_config": false,"performance_monitoring": false,"external_push_client_only": false,"messaging": false,"in_app_messaging": false,"crashlytics": true,"storage": true,"functions": false,"facebook_auth": true,"google_auth": true,"admob": false,"dynamic_links": false,"ml_kit": false
}

解决方法

试试下面的导入格式

onkeydown = "return ((event.keyCode != 186) && (event.keyCode != 32) && (event.keyCode != 188));"

这将避免“未定义”

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...