首页 > 解决方案 > Flutter 应用程序无法编译,因为它的依赖关系无法建立

问题描述

这是“main.dart”中的导入语句

import 'package:firestoreflutter/lib/ui/listveiw_note.dart';

我可以确认该文件存在!但是,当我去编译时,我收到错误消息:

Your application could not be compiled, because its dependencies could not 
be established.
The following Dart file:
/home/jedaa/workspace/flutter_apps/studio/firestoreflutter/lib/main.dart
refers, in an import, to the following library: /home/jedaa/workspace/flutter_apps/studio/firestoreflutter/lib/lib/ui/listveiw_note.dart

Unfortunately, that library does not appear to exist on your file system.

当然它不存在,import 语句也没有说要看那里.. 即:/lib/lib/ui !!!!

这里发生了什么??有人可以帮助我,因为我找不到解决方案。

谢谢你。

标签: firebasegoogle-cloud-firestoreflutter-dependencies

解决方案


尝试取出导入中的库。这是因为firestoreflutter自动为你放入了一个lib,导致错误中看到了这两个lib


推荐阅读