Last active
September 27, 2019 08:03
-
-
Save vivekrk1992/01cca3c731e3d934e85807b62b04f842 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cannot add task ':app:processDebugGoogleServices' as a task with that name already exists. | |
### remove android platform | |
ionic cordova platform rm android | |
file plugins/cordova-plugin-fcm/src/android/FCMPlugin.gradle | |
dependencies { | |
compile 'com.google.firebase:firebase-core:10.+' | |
} | |
// apply plugin: 'com.google.gms.google-services' | |
// class must be used instead of id(string) to be able to apply plugin from non-root gradle file | |
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin | |
### Replace with this | |
dependencies { | |
compile 'com.google.firebase:firebase-core:11.8.0' | |
} | |
// apply plugin: 'com.google.gms.google-services' | |
// class must be used instead of id(string) to be able to apply plugin from non-root gradle file | |
// apply plugin: com.google.gms.googleservices.GoogleServicesPlugin | |
ext.postBuildExtras = { | |
if (project.extensions.findByName('googleServices') == null) { | |
// apply plugin: 'com.google.gms.google-services' | |
// class must be used instead of id(string) to be able to apply plugin from non-root gradle file | |
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin | |
} | |
} | |
### in ---> plugins/cordova-plugin-fcm-with-dependecy-updated/plugin.xml | |
<framework src="com.google.firebase:firebase-core:10.+" /> | |
<framework src="com.google.firebase:firebase-messaging:10.+" /> | |
### Replace with this | |
# check line number 61 and 62 | |
<framework src="com.google.firebase:firebase-core:11.8.0" /> | |
<framework src="com.google.firebase:firebase-messaging:11.8.0" /> | |
### then add platform ionic cordova platform add android | |
### manually clone the google-services.json to platforms/android/app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment