Madra
Madra

Reputation: 29

Getting error after implement 'com.google.firebase:firebase-core:17.0.0' and apply plugin: 'com.google.gms.google-services'

I got an error when try to build my apps after adding implementation 'com.google.firebase:firebase-core:17.0.0' and apply plugin: 'com.google.gms.google-services' in my app build.gradle file

I have using line com.android.tools.build:gradle:3.4.0 and compileSdkVersion = 28

I put those lines in my project build.gradle file. before I putting those line, I am able to build the project

The error message I got:

`Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:13:5-354:19 to override.

Upvotes: 1

Views: 101

Answers (1)

Madra
Madra

Reputation: 29

I got this after some research.

I updated my app to use Jetpack (AndroidX), I do this by adding these two lines: android.useAndroidX=true and android.enableJetifier=true into file gradle.properties in the project root directory

Upvotes: 1

Related Questions