简体   繁体   English

不适用于main.dart配置

[英]Not applicable for the main.dart configuration

I am facing the following issue while selecting the device for emulator.在为模拟器选择设备时,我遇到了以下问题。 It shows "nothing here" in devices marked with green and "not applicable for main.dart" for the one marked with red.它在标有绿色的设备中显示“这里没有”,而在标有红色的设备中显示“不适用于 main.dart”。 Image- img图像-img

I came across a warning regarding white spaces in android sdk path when i went to tools>sdk manager>android sdk当我转到工具> SDK 管理器> android sdk 路径时,我遇到了关于 android sdk 路径中空格的警告
Hence i shifted the entire android folder to C:\Android\sdk and i got rid of that warning but now on running the command 'flutter doctor', my android sdk cannot be located. Hence i shifted the entire android folder to C:\Android\sdk and i got rid of that warning but now on running the command 'flutter doctor', my android sdk cannot be located. This could be because i changed the path of sdk but i also changed the environment variable.这可能是因为我更改了 sdk 的路径,但我也更改了环境变量。
Images as follows-图片如下——
flutter doctor- flutter doctor flutter 博士- flutter 博士
Path environment variable in SYSTEM variable- environment variable SYSTEM变量-环境变量中的路径环境变量
SDK manager- android sdk SDK 经理 - android sdk



What else am i missing here?我在这里还缺少什么?

You might have missed setting the Project SDK.您可能错过了设置项目 SDK。

Go to File > Project Structure Go 到文件 > 项目结构

Under Project Settings > Project, make sure you've selected the latest Project SDK, Apply Changes and restart Android Studio, then you will be able to see and open from the list of installed emulators.在 Project Settings > Project 下,确保您选择了最新的 Project SDK,Apply Changes 并重新启动 Android Studio,然后您将能够看到并从已安装的模拟器列表中打开。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM