LoginSignup
13
5

More than 3 years have passed since last update.

Flutter で"Error connecting to the service protocol:HttpException"が発生したら[忘備録]

Posted at

発生状況、環境

OS: Windows10 Home バージョン1809
Flutter: Flutter 1.5.4-hotfix.2 Dart 2.3.0
IDE: Android Studio 3.4.1
AVD: Pixel 3 OS: Q

Android Studioをインストール後、
Flutterプラグインをインストール、
New Flutter Projectでプロジェクト作成直後にRun
エミュレータ上ではアプリは立ち上がったものの、コンソールに以下のような表示
HotReloadが効かなくなってしまいました(Flutterの良いとこが・・・)

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...
Error connecting to the service protocol: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:54217/mB72oudgKOI=/ws

エラーメッセージで検索してものの出てくるのはmac環境だったりでいまいち解決法もいまいちわからず
YouTubeで検索したらそれらしき動画が・・・

解決法

原因がいまいちわかってないので解決法と言えるかわかりませんが
Android Qだと発生するよう
エミュレータをAndroid Piに変更したらエラーは表示されず
HotReloadも無事動作しました。

もし同じような状況でエラーか発生するような方がいたらお試しください

13
5
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
5