Problem with play-services-measurement-base on ionic

Solution 1:

No solutions posted here worked for me. A wonderful person opened a pull request in the cordova-firebase-plugin official repo and it works.

Steps I did:

1 - Remove cordova-firebase-plugin with ionic cordova plugin remove cordova-plugin-firebase

2 - Install: ionic cordova plugin add cordova-plugin-firebasex

3 - rm -rf node_modules/ plugins/ platforms/android package-lock.json

4 - ionic cordova platform add android && npm install

And now it's working.

Solution 2:

I found a solution for me in the forum mentioned in Yannic Hamann answer (Ionic Forum).

The comment from systems_qualigy here is about locking the versions in project.properties.

cordova.system.library.4=com.google.firebase:firebase-core:16.0.8 
cordova.system.library.5=com.google.firebase:firebase-messaging:17.5.0 
cordova.system.library.6=com.google.firebase:firebase-config:16.4.1 
cordova.system.library.7=com.google.firebase:firebase-perf:16.2.4

I need also to lock the version of

com.google.android.gms:play-services-tagmanager:16.0.8

I took the version from Martins answer and could succesfully rebuild my project.

Solution 3:

We are now maintaining a forked version which includes all the changes & fixes done by different authors (who have saved everyone from this Google's move).

https://github.com/wizpanda/cordova-plugin-firebase-lib#difference-from-the-fork-repository

So, now just remove the existing plugin with:

ionic cordova plugin remove cordova-plugin-firebase

And now, install new version with

ionic cordova plugin add cordova-plugin-firebase-lib --save

Cheers!