目前,我在运行Flutter应用程序时遇到问题。我尝试搜索解决方案,但实际上都不是我的情况。问题是,当我尝试安装应用程序时,有时它会开始运行,但立即崩溃,甚至无法生成,并抛出此异常(即使使用flutter演示项目):
Error connecting to the service protocol: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:57564/ws".
Run Code Online (Sandbox Code Playgroud)
到目前为止,我已经尝试过:清理现金,重新安装flutter / android studio。我只有几个(android os)手机遇到了这个问题。导入'package:flutter / material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(appBar: AppBar(title: Text("App"))),
);
}
}
Run Code Online (Sandbox Code Playgroud)