title: New Firebase Initialize Crashes
body: <pre><code>FirebaseRemoteConfig mFirebaseRemoteConfig = FirebaseRemoteConfig.getInstance();
  </code></pre>
  
  <p>When i call this the app crashes the error log says FirebaseApp doesn't exist.</p>
  
  <pre><code>Caused by: java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist. 
      at com.google.firebase.FirebaseApp.getInstance(Unknown Source)
      at com.google.firebase.FirebaseApp.getInstance(Unknown Source)
      at com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance(Unknown Source)
  </code></pre>
  
  <p>So i tried to initialised FireBase Myself. so, new code looks like</p>
  
  <pre><code>FirebaseApp.initializeApp(this, FirebaseOptions.fromResource(this));
  FirebaseRemoteConfig mFirebaseRemoteConfig = FirebaseRemoteConfig.getInstance();
  </code></pre>
  
  <p>The new issue is quite the opposite. Check the crash Log it says that FirebaseApp already exists</p>
  
  <pre><code>Caused by: java.lang.IllegalStateException: FirebaseApp name [DEFAULT] already exists!
       at com.google.android.gms.common.internal.zzaa.zza(Unknown Source)
       at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
       at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
  </code></pre>
  
  <p>Did my Firebase App initialised/ should i initialise it ?? Because in both cases my app crashes and even crash reports are not working. Here is the crash report error</p>
  
  <pre><code>E/FirebaseCrashSenderServiceImpl: Error sending crash report
      ait: Server did not receive report: Origin Error message: Mobile Crash and Performance Reporting API has not been used in project project-546786591250077938 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/mobilecrashreporting.googleapis.com/overview?project=project-XXXXXXXXXX then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
      at com.google.firebase.crash.internal.service.FirebaseCrashSenderServiceImpl.a(:com.google.android.gms.DynamiteModulesC:299)
      at com.google.firebase.crash.internal.service.FirebaseCrashSenderServiceImpl.a(:com.google.android.gms.DynamiteModulesC:146)
      at com.google.firebase.crash.internal.service.FirebaseCrashSenderServiceImpl.onHandleIntent(:com.google.android.gms.DynamiteModulesC:108)
      at aid.onTransact(:com.google.android.gms.DynamiteModulesC:69)
      at android.os.Binder.transact(Binder.java:387)
      at com.google.firebase.crash.internal.zzf$zza$zza.zzI(Unknown Source)
      at com.google.firebase.crash.internal.service.FirebaseCrashSenderService.onHandleIntent(Unknown Source)
  </code></pre>
  
  <p>My build.gradle</p>
  
  <pre><code>ext {
      firebaseVersion = "9.0.0"
  }
  dependencies {
      compile "com.google.firebase:firebase-core:${firebaseVersion}"
      compile "com.google.firebase:firebase-ads:${firebaseVersion}"
      compile "com.google.firebase:firebase-crash:${firebaseVersion}"
      compile "com.google.firebase:firebase-config:${firebaseVersion}"
  }
  </code></pre>