【发布时间】:2020-05-27 19:02:03
【问题描述】:
我是颤振和飞镖的初学者,我刚刚创建了我的应用程序,因为它会自动创建一个模板应用程序,它会在测试文件夹中的 widget_test.dart 文件中引发错误
The function 'myApp' isn't defined.
Try importing the library that defines 'myApp', correcting the name to the name of an existing function, or defining a function named 'myApp'.
{
"resource": "/D:/development/hello_rectangle/test/widget_test.dart",
"owner": "dart",
"code": "undefined_function",
"severity": 8,
"message": "The function 'myApp' isn't defined.\nTry importing the library that defines 'myApp', correcting the name to the name of an existing function, or defining a function named 'myApp'.",
"source": "dart",
"startLineNumber": 16,
"startColumn": 29,
"endLineNumber": 16,
"endColumn": 34,
"tags": []
}
我试过升级flutter,但是不行!!
【问题讨论】:
-
你有没有按照安装和设置flutter一步一步来?
-
是的,我做到了。我最近为了练习目的运行了几个应用程序,我不知道这个错误是如何在这个默认模板代码中引起的!!
标签: android-studio flutter dart visual-studio-code