Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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
- <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
- ### cp google-services.json platforms/android/app/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement