title: unable to add Firebse to my android studio
body: <p>I am trying to add firebase to my app and followed every step as told in <a href="https://firebase.google.com/docs/android/setup" rel="nofollow noreferrer">https://firebase.google.com/docs/android/setup</a>
  but as soon as a launch the app it crashes with the error</p>
  <pre><code>E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.example.examplefirestore, PID: 29977
      java.lang.BootstrapMethodError: Exception from call site #8 bootstrap method
          at com.google.firebase.components.ComponentDiscovery.discoverLazy(ComponentDiscovery.java:112)
          at com.google.firebase.FirebaseApp.&lt;init&gt;(FirebaseApp.java:418)
          at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:299)
          at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:267)
          at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:252)
          at com.google.firebase.provider.FirebaseInitProvider.onCreate(FirebaseInitProvider.java:51)
          at android.content.ContentProvider.attachInfo(ContentProvider.java:1919)
          at android.content.ContentProvider.attachInfo(ContentProvider.java:1894)
          at com.google.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:45)
          at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
          at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938)
          at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853)
          at android.app.ActivityThread.access$1100(ActivityThread.java:199)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
          at android.os.Handler.dispatchMessage(Handler.java:106)
          at android.os.Looper.loop(Looper.java:193)
          at android.app.ActivityThread.main(ActivityThread.java:6669)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
       Caused by: java.lang.ClassCastException: Bootstrap method returned null
          at com.google.firebase.components.ComponentDiscovery.discoverLazy(ComponentDiscovery.java:112) 
          at com.google.firebase.FirebaseApp.&lt;init&gt;(FirebaseApp.java:418) 
          at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:299) 
          at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:267) 
          at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:252) 
          at com.google.firebase.provider.FirebaseInitProvider.onCreate(FirebaseInitProvider.java:51) 
          at android.content.ContentProvider.attachInfo(ContentProvider.java:1919) 
          at android.content.ContentProvider.attachInfo(ContentProvider.java:1894) 
          at com.google.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:45) 
          at android.app.ActivityThread.installProvider(ActivityThread.java:6391) 
          at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938) 
          at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853) 
          at android.app.ActivityThread.access$1100(ActivityThread.java:199) 
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) 
          at android.os.Handler.dispatchMessage(Handler.java:106) 
          at android.os.Looper.loop(Looper.java:193) 
          at android.app.ActivityThread.main(ActivityThread.java:6669) 
          at java.lang.reflect.Method.invoke(Native Method) 
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
  </code></pre>
  <p>I have also cross checked my gradle moudle and every thing seems to be fine, here is my gradle module</p>
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'com.google.gms.google-services'
  android {
      compileSdkVersion 30
      buildToolsVersion &quot;30.0.1&quot;
  
      defaultConfig {
          applicationId &quot;com.example.examplefirestore&quot;
          minSdkVersion 24
          targetSdkVersion 30
          versionCode 1
          versionName &quot;1.0&quot;
  
          testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: &quot;libs&quot;, include: [&quot;*.jar&quot;])
      implementation 'androidx.appcompat:appcompat:1.3.0'
      implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test.ext:junit:1.1.2'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
      implementation platform('com.google.firebase:firebase-bom:28.1.0')
      implementation 'com.google.firebase:firebase-analytics'
      implementation 'com.google.firebase:firebase-firestore'
  
  }
  </code></pre>
  <p>Even in graple project everything seems to be ok to me i have cross checked this multiple times, this is my gradle project</p>
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  buildscript {
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath &quot;com.android.tools.build:gradle:4.0.2&quot;
          classpath 'com.google.gms:google-services:4.3.8'
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>