【问题标题】:ionic 3 native google-maps and native firebase plugins it does not fail together in the appionic 3 本机 google-maps 和本机 firebase 插件它不会在应用程序中一起失败
【发布时间】:2018-04-02 01:20:04
【问题描述】:

当我在同一个应用程序中安装这两个插件时在设备上不起作用,我分别安装了插件并且它们工作,我已经更改了版本仍然失败,有什么想法吗?

科尔多瓦 7.0.1 离子 3.20.0

package.json "cordova-plugin-firebase": "^0.1.25", "cordova-plugin-googlemaps": "^2.2.9",

【问题讨论】:

    标签: firebase ionic-framework maps


    【解决方案1】:

    更好地构建 apk 或为具有 ionic cordova 平台的设备添加 android 并使用 android studio。

    平台 android - app - build.gradle .. 尝试改变

    dependencies {
        implementation fileTree(dir: 'libs', include: '*.jar')
        // SUB-PROJECT DEPENDENCIES START
        implementation(project(path: ":CordovaLib"))
        compile "com.google.firebase:firebase-core:11.8.0"
        compile "com.google.firebase:firebase-messaging:11.8.0"
        compile "com.google.android.gms:play-services-tagmanager:11.8.0"
        compile "com.google.firebase:firebase-crash:11.8.0"
        compile "com.google.firebase:firebase-config:11.8.0"
        compile "com.google.android.gms:play-services-maps:11.8.0"
        compile "com.google.android.gms:play-services-location:11.8.0"
        compile "com.android.support:support-core-utils:24.1.0"
        compile "com.android.support:support-v4:26.+"
        compile "com.squareup.okhttp3:okhttp:3+"
        // SUB-PROJECT DEPENDENCIES END
    }
    在平台 -> android -> cordova-plugin-firebase

    dependencies {
        compile 'me.leolin:ShortcutBadger:1.1.4@aar'
        compile 'com.google.firebase:firebase-crash:11.8.0'
        compile 'com.google.firebase:firebase-auth:11.8.0'
    }

    在包中,json

    "dependencies": {
    "cordova-plugin-googlemaps": "^2.2.8",
    "cordova-plugin-firebase": "^0.1.25",
    },
    "cordova": {
      "plugins": {
        "cordova-plugin-googlemaps": {
          "API_KEY_FOR_ANDROID": "API MAP ANDROID",
          "API_KEY_FOR_IOS": "API MAP IOS"
          },
      }
    }

    API MAP ANDROID https://developers.google.com/maps/documentation/android-api/signup?hl=id

    API MAP IOS https://developers.google.com/maps/documentation/ios-sdk/get-api-key

    【讨论】:

      猜你喜欢
      • 2023-03-11
      • 1970-01-01
      • 2019-01-08
      • 2018-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-05
      • 1970-01-01
      相关资源
      最近更新 更多