I had simple Flutter app with debug config. After I change the gradle config and other stuff to build apk in release mode.I did all the config based on the documentation and release build works fine. But now I cannot run app in debug mode. It show this error
I/flutter (15809): Observatory server failed to start after 11 tries
I/flutter (15809): Could not start Observatory HTTP server:
I/flutter (15809): SocketException: Failed to create server socket (OS Error: Permission denied, errno = 13), address = 127.0.0.1, port = 0
I/flutter (15809): #0 _NativeSocket.bind (dart:io/runtime/binsocket_patch.dart:545:7)
I/flutter (15809): <asynchronous suspension>
I/flutter (15809): #1 _RawServerSocket.bind (dart:io/runtime/binsocket_patch.dart:1138:10)
I/flutter (15809): #2 _ServerSocket.bind (dart:io/runtime/binsocket_patch.dart:1385:10)
I/flutter (15809): #3 ServerSocket.bind (dart:io/runtime/binsocket_patch.dart:1375:26)
I/flutter (15809): #4 _HttpServer.bind (dart:_http/http_impl.dart:2503:10)
I/flutter (15809): #5 HttpServer.bind (dart:_http:276:19)
I/flutter (15809): #6 Server.startup.poll (dart:vmservice_io/server.dart:352:36)
I/flutter (15809): <asynchronous suspension>
I/flutter (15809): #7 Server.startup (dart:vmservice_io/server.dart:364:23)
I/flutter (15809): <asynchronous suspension>
I/flutter (15809): #8 main (dart:vmservice_io:239:12)
I/flutter (15809):
It shows white screen and nothing get loaded.
When building the release version it says to remove internet permission if the app does not need it. But when we are doing the development we must keep that.Because internet permission is required to work hot reload. After I added
<uses-permission android:name="android.permission.INTERNET"/>
to the manifest, everything works fine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With