[英]Main.dart is not recognising as as .dart file in android studio
In flutter project, main.dart is not recognizing as.dart file in android studio as shown in the screenshot attached.在 flutter 项目中,main.dart 无法识别为 ZC31B32364CE19CA8FCD150A417ECCE5 工作室中 ZC31B32364CE19CA8FCD150A417ECCE5 中的文件。 If I change the name of the file then it's recognizing.如果我更改文件的名称,那么它正在识别。 click here to view screenshot点击这里查看截图
Looks to me that the IDE is incorrectly associating your file as a Text file.在我看来,IDE 错误地将您的文件关联为文本文件。
I managed to make it work was by doing the following (on Android Studio for MacOS):我设法使它工作是通过执行以下操作(在 Android Studio for MacOS 上):
Override File Type
在 main.dart 文件上,右键单击并单击Override File Type
I am facing the same problem, fixed it by right click the file and select the Override File Type
menu, in the popup file type menu, select the dart or whatever the really file type you needed.我面临同样的问题,通过右键单击文件和 select Override File Type
菜单,在弹出的文件类型菜单中,select dart 或您真正需要的文件类型修复它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.