Exception has occurred. PlatformException (PlatformException(channel-error, Unable to establish connection on channel., null, null))
CodePudding user response:
try this :
Run in the terminal,
flutter pub outdated
Next, update the packages which are outdated
flutter pub upgrade outdated_package
Then, run flutter clean
next flutter pub get
CodePudding user response:
- Step 1:
In
pubspec.yaml
have you addedfirebase_core
?
- Step 2:
If no then please goto
pub.dev
and find the latest version of it and add topubspec.yaml
Step 4: into main.dart add this
Future<void> main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp();
}
Step 3:
If yes, then run
flutter clean
andflutter pub get