Exception has occurred. PlatformException (PlatformException(channel-error, Unable to establish connection on channel., null, null))
Asked
Active
Viewed 118 times
0
-
https://stackoverflow.com/q/72880037/17180860 – Jinto Joseph Feb 01 '23 at 06:38
2 Answers
0
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

HoRiz
- 706
- 4
- 15
-
-
-
It show this error Exception has occurred. PlatformException (PlatformException(channel-error, Unable to establish connection on channel., null, null)) – Unknown_Coder Feb 01 '23 at 06:36
-
-
-
ok, replace firebase_core: ^2.4.1 in dependency. run flutter pub upgrade firebase_core – HoRiz Feb 01 '23 at 06:41
-
is it not ok, try --> change android/app/build.gradle update compileSdkVersion flutter.compileSdkVersion to 33 – HoRiz Feb 01 '23 at 06:42
-
-
Go to android in your app and next app next open build.gradle in Android studio. There is compileSdkVersion. update it flutter.compileSdkVersion to 33 – HoRiz Feb 01 '23 at 07:36
-
Thanks for you precious time but issue is still there as I didnt get how to update compileSdkVersion – Unknown_Coder Feb 01 '23 at 07:56
-
-
0
- 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

Rahul Variya
- 1,257
- 1
- 6
- 15
-
I've done all these things Please help unable to solve the issue from 2 days – Unknown_Coder Feb 01 '23 at 06:24
-
-
-
-
Flutter (Channel stable, 3.3.3, on Microsoft Windows [Version 10.0.22621.1105], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.5) [√] Android Studio (version 2021.3) [√] VS Code (version 1.74.3) [√] Connected device (4 available) [√] HTTP Host Availability – Unknown_Coder Feb 01 '23 at 07:05
-
-
-
-