我正在尝试调试一个颤振项目。该程序抛出错误,因为widget_test.dart无法导入main.dart
我通常使用Intellij创建项目。这是我使用Visual Studio Code创建的第一个项目。
我无法清除此错误消息
Target of URI doesn't exist: 'package:ipl_test2/main.dart'.
这个错误的原因是什么?以及如何清除此错误?
您必须使用与pubspec.yaml
文件中描述的名称相同的名称,特别是name
属性。
import 'package:change_the_name_here/main.dart';