Code Monkey home page Code Monkey logo

cordova-support-google-services's Introduction

Cordova plugin to add support for google services

NPM version NPM downloads Twitter

Donate Your help is appreciated. Create a PR, submit a bug or just grab me ๐Ÿบ

As part of enabling Google APIs or Firebase services in your Android application you may have to add the google-services plugin to your build.gradle file.

Index

Installation

cordova plugin add cordova-support-google-services --save

You also need to download google-services.json on Android and GoogleService-Info.plist on iOS from Firebase console and put them into the cordova project root folder. Then use <resource-file> to copy those files into appropriate folders:

<platform name="android">
    <resource-file src="google-services.json" target="app/google-services.json" />
    ...
</platform>
<platform name="ios">
    <resource-file src="GoogleService-Info.plist" />
    ...
</platform>

Note: if you use cordova-android below version 7 specify target="google-services.json" instead.

FAQ

Build Error: Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']

It looks like you have another dependency on a google play services lib with a generic verison *. You have to fix ALL dependency version(s) to be more more specific like 11.0.+. In order to do that fix version strings for any play services library you have in platforms/android/project.properties.

Build Error: Could not generate a proxy class for class com.google.gms.googleservices.GoogleServicesTask.

Open platform/android/build.gradle and change version of the first com.android.tools.build:gradle:

classpath 'com.android.tools.build:gradle:1.2.3+'

Duplicate resources: .../platforms/android/build/generated/res/google-services/armv7/debug/values/values.xml:string/google_api_key, .../platforms/android/res/values/strings.xml:string/google_api_key

Remove google_api_key and google_app_id from any existing xml file from platform/android/res/ folder. Those values now come from an automatically generated values.xml.

cordova-support-google-services's People

Contributors

chemerisuk avatar eric-fisher-resmed avatar rhyanbridle avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.