Manifest merger failed : Attribute application@appComponentFactory updating Firebase libraries

With new release, libraries are migrated from the Android Support Libraries to the Jetpack (AndroidX) Libraries.

The updated libraries will not work unless you make the following changes in your app:

  • Upgrade com.android.tools.build:gradle to v3.2.1 or later.

  • Upgrade compileSdkVersion to 28 or later.

  • Update your app to use Jetpack (AndroidX); follow the instructions in Migrating to AndroidX.

Method-1 :

add this two in your gradle.properties File, without updating anything

android.useAndroidX=true
android.enableJetifier=true

Method-2

if Method-1 doesn't solve your problem do one thing if you are using android studio version 3.2 or higher go to Refactor>Migrate to AndroidX...


According to the firebase site to solve this issue:

  • Update your app to use Jetpack (AndroidX), you can do this by adding these two lines: android.useAndroidX=true and android.enableJetifier=true into file gradle.properties in the project root directory. Or you can do another method
  • Upgrade com.android.tools.build:gradle to v3.2.1 or later (in project build.gradle file)
  • Upgrade compileSdkVersion to 28 or later (in project build.gradle file)

Either downgrade those Firebase dependencies - or migrate to androidx.

The Jetifier is rather useless, because having control over the own dependencies.