Fix Google Maps and FCM Conflict on Ionic
1 min readAug 12, 2018
This will be a quick and short as it is intended as my quick reference.
Google Maps and FCM on Ionic does not work well together, they have different shared dependencies version, and it does cause a lot of mess.
Here are the steps on how I fixed it:
- Edit customer-FCMPlugin.gradle.
- Remove classpath for google-services
- Remove applied plugin
- Update FCM plugin accordingly, my case 16.0.1
- Open FCM plugin.xml
- Update framework version
- Remove platform android
- Readd platform android
- Try running
- If it crashed, it probably Firebase not initialized yet error.
- Open MainActivity.java generated by cordova, initialize Firebase manually.
- Open values.xml inside resources.
- Add
<string name="google_app_id" templateMergeStrategy="preserve" translatable="false">***</string>
“client”: [{“client_info”: {“mobilesdk_app_id”: this value