Muteeb Rehman
Muteeb Rehman

Reputation: 71

firebase connection error in flutter ([ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException)

i am trying to connect firebase with my flutter app and i followed every step correctly: (my android studio version is andriod studio giraffe latest)

steps:

  1. add the plugin in build.gradle app level
  2. add dependency in build.gradle project level
  3. added google json file given by firebase in app level

but i am getting this error when this line runs Firebase.initializeApp();

the error: E/flutter ( 575): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(null-error, Host platform returned null value for non-null return value., null, null) E

i followed every step correctly and was expecting the connection will be established.

Upvotes: 1

Views: 4815

Answers (1)

Muteeb Rehman
Muteeb Rehman

Reputation: 71

the steps being followed are outdated now. presently you do not have to setup firebase with flutter manually, you just have to use flutter fire cli. the older method of manually adding everything is not supported by firebase now. this is the link for complete guide of new method: https://firebase.google.com/docs/flutter/setup?platform=android

Upvotes: 1

Related Questions