title: why am i getting Manifest merge error when apply firebase and google authentication libraries
body: <p>i am trying to connect my app to firebase and use the google authentication system inside it </p>
  
  <p>when applying the libraries i get a manifest merge error 
  the error is in this line </p>
  
  <pre><code>implementation 'com.google.firebase:firebase-core:17.0.0'
  </code></pre>
  
  <p>this is the error i get </p>
  
  <pre><code>ERROR: 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 &lt;application&gt; element at AndroidManifest.xml:5:5-23:19 to override.
  </code></pre>
  
  <p>when downgrading the version to 16.0.0 the error is gone however I can't add any other libraries for example if I want to add</p>
  
  <pre><code>implementation 'com.google.firebase:firebase-auth:18.0.0'
  </code></pre>
  
  <p>I get this error </p>
  
  <pre><code>ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.
  1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
  
  Dependency failing: com.google.android.gms:play-services-stats:15.0.1 -&gt; com.google.android.gms:play-services-basement@[
  15.0.1], but play-services-basement version was 17.0.0.
  
  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.firebase:firebase-core@{strictly 16.0.0}
  -- Project 'app' depends onto com.google.android.gms:play-services-flags@{strictly 17.0.0}
  -- Project 'app' depends onto com.google.firebase:firebase-auth@18.0.0
  -- Project 'app' depends onto com.google.firebase:firebase-core@16.0.0
  -- Project 'app' depends onto com.google.firebase:firebase-analytics-impl@{strictly 16.0.0}
  
  </code></pre>
  
  <p>I am new to android and any advice would be great </p>
  
  <p>this is my app build.gradle</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId "com.example.firebasetestingprojecttwo"
          minSdkVersion 16
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:28.0.0'
  
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      implementation 'com.android.support:design:28.0.0'
      implementation 'com.android.support:support-v4:28.0.0'
      implementation 'com.android.support:gridlayout-v7:28.0.0'
  
  
      implementation 'com.google.firebase:firebase-core:17.0.0'
  
  }
  
  apply plugin: 'com.google.gms.google-services'
  
  </code></pre>