0

I have tried the solution provided at: Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)

However, all dependencies in my project are up to date.

I have specified minSdkVersion 21 and multiDexEnabled true in my android/app/build.gradle file as well.

Is there anything else I need to do?

Ayan Dasgupta
  • 304
  • 1
  • 4
  • 11

2 Answers2

0

Make sure to check the firebase_auth dependency version in your app, in my case, when the firebase_auth version is ^4.4.2, then the intl package version should be 0.17.0.

  intl: ^0.17.0
  firebase_auth: ^4.4.2
David Tran
  • 29
  • 4
-1

It turns out that the application name was not matching between the firebase_options.dart and android/app/build.gradle. I updated the code to make them match and it worked.

Ayan Dasgupta
  • 304
  • 1
  • 4
  • 11
  • What application name? There's no application name in firebase_options.dart. I created my project using `flutter create mytrial`, my firebase project is called `flutter-auth`. When you say, "my application name was not matching" between those two files, care to explain *exactly* what you mean? I'm facing a similar issue, and although you marked yourself an answer, your answer more vague than the original error – KhoPhi Mar 30 '23 at 20:26