capacitor-community / fcm

Enable Firebase Cloud Messaging for Capacitor apps
https://capacitor.ionicframework.com/docs/
MIT License
237 stars 83 forks source link

FirebaseInstallations is not included in plugin dependencies #105

Closed vjfuenzalida closed 11 months ago

vjfuenzalida commented 2 years ago

Describe the bug When trying to build an Ionic project using the FCM package in Android Studio, an error appears saying the package FirebaseInstallations is not found (imported in FCMPlugin.java).

To Reproduce Steps to reproduce the behavior:

  1. Add the FCM package to an Ionic plugin.
  2. Follow the setup steps for Android.
  3. Build the project in Android Studio
  4. See error

Expected behavior The dependency should be added to the build.gradle file, by including the following code:

ext {
    ...,
    firebaseInstallationsVersion =  project.hasProperty('firebaseInstallationsVersion') ? rootProject.ext.firebaseInstallationsVersion : '16.3.5'
}

and

dependencies {
    ...,
    implementation "com.google.firebase:firebase-installations:$firebaseInstallationsVersion"
}