Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. # Cannot add task ':app:processDebugGoogleServices' as a task with that name already exists.
  2.  
  3. ### remove android platform
  4.  
  5. ionic cordova platform rm android
  6.  
  7. file plugins/cordova-plugin-fcm/src/android/FCMPlugin.gradle
  8. dependencies {
  9. compile 'com.google.firebase:firebase-core:10.+'
  10. }
  11. // apply plugin: 'com.google.gms.google-services'
  12. // class must be used instead of id(string) to be able to apply plugin from non-root gradle file
  13. apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
  14.  
  15. ### Replace with this
  16.  
  17. dependencies {
  18. compile 'com.google.firebase:firebase-core:11.8.0'
  19. }
  20. // apply plugin: 'com.google.gms.google-services'
  21. // class must be used instead of id(string) to be able to apply plugin from non-root gradle file
  22. // apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
  23. ext.postBuildExtras = {
  24. if (project.extensions.findByName('googleServices') == null) {
  25. // apply plugin: 'com.google.gms.google-services'
  26. // class must be used instead of id(string) to be able to apply plugin from non-root gradle file
  27. apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
  28. }
  29. }
  30.  
  31.  
  32. ### in ---> plugins/cordova-plugin-fcm-with-dependecy-updated/plugin.xml
  33.  
  34. <framework src="com.google.firebase:firebase-core:10.+" />
  35. <framework src="com.google.firebase:firebase-messaging:10.+" />
  36.  
  37. ### Replace with this
  38.  
  39. <framework src="com.google.firebase:firebase-core:11.8.0" />
  40. <framework src="com.google.firebase:firebase-messaging:11.8.0" />
  41.  
  42.  
  43. ### then add platform ionic cordova platform add android
  44.  
  45. ### manually clone the google-services.json to platforms/android/app
  46.  
  47. ### cp google-services.json platforms/android/app/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement