Ionic 4 Cordova - Run Android Firebase error all of a sudden

the solution is :

rewrite platforms/android/app/build.gradle and platforms/android/ by updating :

This seems more a workaround then a real solution… developers should avoid to change data in platform directotyor as well plugins directory because its are generated…

1 Like

Google support libraries are deprecated (April, I think). So you have to lock your libraries for now.

Try this, worked for me. You have to make changes in the FCM project files -

Gazzab Bro Gazzab…

ok,this what works for me

“cordova-plugin-firebase”: “2.0.5”, file

build.gradle file

buildscript {
repositories {
maven {
url “
maven {
url ‘
} }
dependencies {

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    classpath ''
    classpath '' // google-services dependency from cordova-plugin-firebase
    classpath '' // fabric dependency from cordova-plugin-firebase


allprojects {
repositories {
google()// add it to top instead of bottom or somewhere in middle
maven {
url ‘

//This replaces w.r.t. build settings
project.ext {
  defaultBuildToolsVersion="27.0.1" //String
  defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
  defaultTargetSdkVersion=27 //Integer - We ALWAYS target the latest by default
  defaultCompileSdkVersion=27 //Integer - We ALWAYS compile with the latest by default


1 Like

not work for me
But after several attempts I have reached to this



Thank you very much. It works for me

ionic start myApp tabs
cd myApp
ionic cordova platform add android@latest
ionic cordova plugin add cordova-plugin-firebase --save
ionic cordova build android
//FAIL. The library is being requested by various other libraries at [[16.5.0,16.5.0], [16.4.0,16.4.0]], but resolves to 16.5.0.

it seems everybody has a case by case solution but it is not even working on a brand vanilla app anymore.
i would expect there to be a more general solution.

I for myself have tried everything mentioned here without any luck.
So, push notifications is now gone for ionic?

Hey outspoken_mag,

I had the same error as you and managed to solve it by firstly editing in (in platforms/android), by fixing the following versions (as has been answered above):

After you edit that file run ionic cordova build android, and then try building.

In my case after I fixed the versions on the one file I needed to build in order for all the files to be set to the pre-specified versions.

thank you for your reply!
I wanted to build within the console and therefore there was no project file

I figured a way (maybe it is of help to someone)
So here is what I did step by step:

remove these directories (after a fresh install not necessary)

then the following steps

  1. ionic cordova plugin add cordova-plugin-firebase --save
  2. open your plugins folder and find the plugins.xml within the firebase directory and open it
  3. replace the framework tags with the following

<framework src="" /> <framework src="" /> <framework src="" /> <framework src="" /> <framework src="" />

  1. ionic cordova platform add android
  2. ionic cordova build android


This works for me:


Thanks, it worked for me also

Thank you so much took me two days to figure it out.

1 Like

This works for me!! Thxs!

This was working fine for me using these values.

I’m using Android-cordova 6.4

But now building android I’m getting this.

he library is being requested by various other libraries at [[17.1.1,17.1.1]], but resolves to 19.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

I’m also getting same error from today

got this fixed after adding

I am still receiving following error: Failed to execute aapt Failed to execute aapt

android:attr/fontVariationSettings not found.
android:attr/ttcIndex not found.

Does anybody have any ideas?

Also getting this error as of today:

Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt
 AAPT: error: resource android:attr/fontVariationSettings not found.
 AAPT: error: resource android:attr/ttcIndex not found.

Current Project Properties:

AND if play-services-tagmanager:+

The library is being requested by various other libraries at [[17.1.1,17.1.1]], but resolves to 19.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.