离子3 app firebase在浏览器上工作但在设备上没有

时间:2018-06-09 20:44:47

标签: android angular cordova firebase ionic3

我正在开发Ionic 3 + firebase应用程序,一切都在离子实验室工作正常,但是当我构建应用程序并将其安装在真正的Android设备上时,应用程序工作正常,只有firebase部分无效。当我点击一个按钮将一些数据发送到firebase时,加载控件会出现,但仍然在旋转而没有成功或错误,而firebase上没有新记录。当我在离子实验室运行它时,所有这些都能正常工作。

这是我的package.json

{
  "name": "datasaver",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/animations": "5.2.9",
    "@angular/common": "5.2.9",
    "@angular/compiler": "5.2.9",
    "@angular/compiler-cli": "5.2.9",
    "@angular/core": "5.2.9",
    "@angular/forms": "5.2.9",
    "@angular/http": "5.2.9",
    "@angular/platform-browser": "5.2.9",
    "@angular/platform-browser-dynamic": "5.2.9",
    "@ionic-native/background-geolocation": "^4.7.0",
    "@ionic-native/camera": "^4.7.0",
    "@ionic-native/core": "4.6.0",
    "@ionic-native/geolocation": "^4.7.0",
    "@ionic-native/location-accuracy": "^4.7.0",
    "@ionic-native/splash-screen": "4.6.0",
    "@ionic-native/status-bar": "4.6.0",
    "@ionic/storage": "2.1.3",
    "angularfire2": "^5.0.0-rc.10",
    "cordova-android": "7.0.0",
    "cordova-plugin-camera": "^4.0.3",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-geolocation": "^4.0.1",
    "cordova-plugin-ionic-keyboard": "^2.1.2",
    "cordova-plugin-ionic-webview": "^1.2.1",
    "cordova-plugin-mauron85-background-geolocation": "^2.3.5",
    "cordova-plugin-request-location-accuracy": "^2.2.3",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "firebase": "^5.0.4",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "rxjs": "5.5.8",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.1.8",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-geolocation": {
        "GEOLOCATION_USAGE_DESCRIPTION": "To locate you"
      },
      "cordova-plugin-request-location-accuracy": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-camera": {},
      "cordova-plugin-mauron85-background-geolocation": {
        "GOOGLE_PLAY_SERVICES_VERSION": "11+",
        "ANDROID_SUPPORT_LIBRARY_VERSION": "23+",
        "ICON": "@mipmap/icon",
        "SMALL_ICON": "@mipmap/icon",
        "ACCOUNT_NAME": "@string/app_name",
        "ACCOUNT_LABEL": "@string/app_name",
        "ACCOUNT_TYPE": "$PACKAGE_NAME.account",
        "CONTENT_AUTHORITY": "$PACKAGE_NAME"
      }
    },
    "platforms": [
      "android"
    ]
  }
}

似乎是什么问题?

0 个答案:

没有答案