title: Ionic 5 : Can't use FCM Plugin : Google Firebase Cloud Messaging Cordova Push Plugin
body: <p>I have been trying to build my Ionic application for Android, but it always ends with a failed. The cause of my misfortune is the FCM plugin: <a href="https://ionicframework.com/docs/native/fcm" rel="nofollow noreferrer">https://ionicframework.com/docs/native/fcm</a></p>
  
  <p>→　Google Firebase Cloud Messaging Cordova Push Plugin
  <a href="https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated" rel="nofollow noreferrer">https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated</a></p>
  
  <p>This is my Ionic configuration:</p>
  
  <pre><code>Ionic:
  
     Ionic CLI                     : 5.4.16 (/usr/local/lib/node_modules/ionic)
     Ionic Framework               : @ionic/angular 5.0.0
     @angular-devkit/build-angular : 0.803.23
     @angular-devkit/schematics    : 8.1.3
     @angular/cli                  : 8.1.3
     @ionic/angular-toolkit        : 2.1.2
  
  Cordova:
  
     Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
     Cordova Platforms : android 8.1.0, ios 5.1.1
     Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 15 other plugins)
  
  Utility:
  
     cordova-res : not installed
     native-run  : not installed
  
  System:
  
     Android SDK Tools : 26.1.1 (/Users/jonathan/Library/Android/sdk)
     ios-deploy        : 1.9.4
     ios-sim           : 8.0.2
     NodeJS            : v12.14.1 (/usr/local/bin/node)
     npm               : 6.13.4
     OS                : macOS Catalina
     Xcode             : Xcode 11.3.1 Build version 11C504
  </code></pre>
  
  <p>This is my Gradle version:</p>
  
  <pre><code>------------------------------------------------------------
  Gradle 6.2
  ------------------------------------------------------------
  
  Build time:   2020-02-17 08:32:01 UTC
  Revision:     61d3320259a1a0d31519bf208eb13741679a742f
  
  Kotlin:       1.3.61
  Groovy:       2.5.8
  Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
  JVM:          13.0.2 (Oracle Corporation 13.0.2+8)
  OS:           Mac OS X 10.15.3 x86_64
  </code></pre>
  
  <p>This is the informations about my Android Studio:</p>
  
  <p><a href="https://i.stack.imgur.com/wWG1i.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wWG1i.png" alt="enter image description here"></a></p>
  
  <p>And this :</p>
  
  <p><a href="https://i.stack.imgur.com/AUQev.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AUQev.png" alt="enter image description here"></a></p>
  
  <p>When I try to build my ionic project without FCM Plugin I don't have any error, but when I add this plugin I got this errors:</p>
  
  <pre><code>WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
  It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
  FCM PLUGIN GRADLE TOOLS VERSION: 3.5.0registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
  registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
  
  &gt; Task :app:preBuild UP-TO-DATE
  &gt; Task :CordovaLib:preBuild UP-TO-DATE
  &gt; Task :CordovaLib:preDebugBuild UP-TO-DATE
  &gt; Task :CordovaLib:checkDebugManifest UP-TO-DATE
  &gt; Task :CordovaLib:processDebugManifest UP-TO-DATE
  
  &gt; Task :app:preDebugBuild FAILED
  Dependency resolved to an incompatible version: Dependency(fromArtifactVersion=ArtifactVersion(groupId=com.google.android.gms, artifactId=play-services-clearcut, version=11.0.4), toArtifact=Artifact(groupId=com.google.android.gms, artifactId=play-services-tasks), toArtifactVersionString=[11.0.4])
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
  &gt; In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[11.0.
    4]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
  
    Dependency failing: com.google.android.gms:play-services-clearcut:11.0.4 -&gt; com.google.android.gms:play-services-tasks@[
    11.0.4], but play-services-tasks version was 16.0.1.
  
    The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
    ifact with the issue.
    -- Project 'app' depends onto com.google.android.gms:play-services-clearcut@11.0.4
    -- Project 'app' depends onto com.google.android.gms:play-services-safetynet@11.0.4
    -- Project 'app' depends onto com.google.firebase:firebase-analytics@16.5.0
    -- Project 'app' depends onto com.google.firebase:firebase-core@16.0.9
    -- Project 'app' depends onto com.google.android.gms:play-services-base@11.0.4
    -- Project 'app' depends onto com.google.firebase:firebase-messaging@18.0.0
    -- Project 'app' depends onto com.google.firebase:firebase-iid@18.0.0
    -- Project 'app' depends onto com.google.android.gms:play-services-ads@11.0.4
    -- Project 'app' depends onto com.google.android.gms:play-services-tasks@16.0.1
    -- Project 'app' depends onto com.google.android.gms:play-services-base@16.0.1
    -- Project 'app' depends onto com.google.firebase:firebase-common@17.0.0
    -- Project 'app' depends onto com.google.firebase:firebase-iid-interop@16.0.1
    -- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@16.5.0
  
    For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
    endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
    github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
    uild.gradle file.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 8s
  3 actionable tasks: 1 executed, 2 up-to-date
  Command finished with error code 1: /Users/jonathan/Desktop/projects/clients/findlover/platforms/android/gradlew cdvBuildDebug,-b,/Users/jonathan/Desktop/projects/clients/findlover/platforms/android/build.gradle
  /Users/jonathan/Desktop/projects/clients/findlover/platforms/android/gradlew: Command failed with exit code 1 Error output:
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
  &gt; In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[11.0.
    4]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
  
    Dependency failing: com.google.android.gms:play-services-clearcut:11.0.4 -&gt; com.google.android.gms:play-services-tasks@[
    11.0.4], but play-services-tasks version was 16.0.1.
  
    The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
    ifact with the issue.
    -- Project 'app' depends onto com.google.android.gms:play-services-clearcut@11.0.4
    -- Project 'app' depends onto com.google.android.gms:play-services-safetynet@11.0.4
    -- Project 'app' depends onto com.google.firebase:firebase-analytics@16.5.0
    -- Project 'app' depends onto com.google.firebase:firebase-core@16.0.9
    -- Project 'app' depends onto com.google.android.gms:play-services-base@11.0.4
    -- Project 'app' depends onto com.google.firebase:firebase-messaging@18.0.0
    -- Project 'app' depends onto com.google.firebase:firebase-iid@18.0.0
    -- Project 'app' depends onto com.google.android.gms:play-services-ads@11.0.4
    -- Project 'app' depends onto com.google.android.gms:play-services-tasks@16.0.1
    -- Project 'app' depends onto com.google.android.gms:play-services-base@16.0.1
    -- Project 'app' depends onto com.google.firebase:firebase-common@17.0.0
    -- Project 'app' depends onto com.google.firebase:firebase-iid-interop@16.0.1
    -- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@16.5.0
  
    For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
    endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
    github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
    uild.gradle file.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 8s
  Error: /Users/jonathan/Desktop/projects/clients/findlover/platforms/android/gradlew: Command failed with exit code 1 Error output:
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
  &gt; In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[11.0.
    4]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
  
    Dependency failing: com.google.android.gms:play-services-clearcut:11.0.4 -&gt; com.google.android.gms:play-services-tasks@[
    11.0.4], but play-services-tasks version was 16.0.1.
  
    The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
    ifact with the issue.
    -- Project 'app' depends onto com.google.android.gms:play-services-clearcut@11.0.4
    -- Project 'app' depends onto com.google.android.gms:play-services-safetynet@11.0.4
    -- Project 'app' depends onto com.google.firebase:firebase-analytics@16.5.0
    -- Project 'app' depends onto com.google.firebase:firebase-core@16.0.9
    -- Project 'app' depends onto com.google.android.gms:play-services-base@11.0.4
    -- Project 'app' depends onto com.google.firebase:firebase-messaging@18.0.0
    -- Project 'app' depends onto com.google.firebase:firebase-iid@18.0.0
    -- Project 'app' depends onto com.google.android.gms:play-services-ads@11.0.4
    -- Project 'app' depends onto com.google.android.gms:play-services-tasks@16.0.1
    -- Project 'app' depends onto com.google.android.gms:play-services-base@16.0.1
    -- Project 'app' depends onto com.google.firebase:firebase-common@17.0.0
    -- Project 'app' depends onto com.google.firebase:firebase-iid-interop@16.0.1
    -- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@16.5.0
  
    For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
    endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
    github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
    uild.gradle file.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 8s
      at ChildProcess.whenDone (/Users/jonathan/Desktop/projects/clients/findlover/node_modules/cordova-common/src/superspawn.js:135:23)
      at ChildProcess.emit (events.js:223:5)
      at maybeClose (internal/child_process.js:1021:16)
      at Socket.&lt;anonymous&gt; (internal/child_process.js:430:11)
      at Socket.emit (events.js:223:5)
      at Pipe.&lt;anonymous&gt; (net.js:664:12)
  [ERROR] An error occurred while running subprocess cordova.
  
          cordova build android --verbose exited with exit code 1.
  
          Re-running this command with the --verbose flag may provide more information.
    ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
    ionic:utils-process onBeforeExit handler: running 2 functions +0ms
    ionic:utils-process processExit: exiting (exit code: 1) +49ms
  </code></pre>
  
  <p>I create a video about that on youtube:</p>
  
  <p><a href="https://youtu.be/sXod7xCDs8c" rel="nofollow noreferrer">https://youtu.be/sXod7xCDs8c</a></p>
  
  <p>You can see on this video. I can build my project without the FCM Plugin.
  I already check this topic: <a href="https://stackoverflow.com/questions/56070787/after-installing-ionic-cordova-plugin-add-cordova-plugin-fcm-with-dependecy-upda">after installing ionic cordova plugin add cordova-plugin-fcm-with-dependecy-updated my android built not working</a></p>
  
  <p>My problem is not only in that Mac. I have other Mac computer and there are all the time the same error.</p>
  
  <p>I am a very new beginner on Android. I have no control over the configuration of Android files. What is the reason for my error?</p>