Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google chrome 卡在;将文件同步到设备Chrome“;_Google Chrome_Flutter_Flutter Web - Fatal编程技术网

Google chrome 卡在;将文件同步到设备Chrome“;

Google chrome 卡在;将文件同步到设备Chrome“;,google-chrome,flutter,flutter-web,Google Chrome,Flutter,Flutter Web,我使用VS作为IDE 我为web开发进行了所有设置,命令flatter-doctor没有说明任何错误 当我使用Chrome作为设备运行我的项目时,VS陷入了“将文件同步到Chrome设备”的困境 我还尝试通过终端运行我的项目,使用flatter run-d chrome--verbose,运行该命令时发生的奇怪事情是,它成功地同步了所有文件(至少–verbose声明了这一点),但浏览器没有显示任何内容 浏览器控制台中没有错误,我安装了最新版本。我也有类似问题,问题是我的index.html文件没

我使用VS作为IDE

我为web开发进行了所有设置,命令
flatter-doctor
没有说明任何错误

当我使用Chrome作为设备运行我的项目时,VS陷入了“将文件同步到Chrome设备”的困境

我还尝试通过终端运行我的项目,使用
flatter run-d chrome--verbose
,运行该命令时发生的奇怪事情是,它成功地同步了所有文件(至少–verbose声明了这一点),但浏览器没有显示任何内容


浏览器控制台中没有错误,我安装了最新版本。

我也有类似问题,问题是我的index.html文件没有指向我的主页,因为我更改了文件名。转到web文件夹下的index.html文件,检查脚本src是否指向主函数的正确路径

 <script src="main.dart.js" type="application/javascript"></script>

在dart文件顶部添加小部件导入时,我出现了这个错误:
import'file:///xxxxxx“


将其更改为
import'package:my_project/xxxxxxx'
,解决了Chrome问题。希望有帮助。

可能是一个很晚的答案,但如果您不知道如何解决这个问题,请尝试在项目上执行
flatter clean
,然后在发布模式下通过
flatter run--release
运行它。
这应该可以解决问题。

你能从命令行发布
flatter-doctor
摘要以及
flatter-config
的设置吗。@AbhilashC
flatter-doctor
:|
flatter-config