android - 设备不适用于“main.dart”配置
问题描述
在有人向我指出此链接之前,我想提一下,我认为这些没有直接关系。
可以看到我的flutter doctor -v
命令没有错误:
➜ flutter git:(stable) flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.3 19D76, locale en-US)
• Flutter version 1.12.13+hotfix.9 at /Users/johannes/.flutter-cli/flutter
• Framework revision f139b11009 (5 weeks ago), 2020-03-30 13:57:30 -0700
• Engine revision af51afceb8
• Dart version 2.7.2
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/johannes/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4.1, Build version 11E503a
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 45.1.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• No issues found!
然而,我遇到了灰色仿真器设备的问题,消息Device not applicable for the “main.dart” configuration
如下:
我现在只能使用这样的下拉菜单启动模拟器<no device>
:
有趣的是,我实际上能够在设备上运行我的应用程序,而设备仍然是灰色的:
不过,Flutters 的热重载功能似乎无法正常工作。
我已经按照此处的建议将主文件夹添加到项目中,并且我还确保按照同一链接中的建议NO SDK
进行更改。Android Studio 可以找到其中的ANDROID API PLATFORM
所有依赖项。我从GitHub 上Project Structure > Modules
的 stable 分支克隆了 Flutter SKD 。
有谁知道为什么我的设置会这样?
解决方案
推荐阅读
- c - Arduino C 多维数组切换
- postgresql - How to allow a user to see a subset of a table or view
- node.js - 高漏洞:在包 webpack-dev-server 中缺少来源验证,react-scripts 的依赖关系
- angular - Rxjs retry() 继续调用
- java - 将事件源连接到创建并返回 SSEEmitter 的 Java 函数时,如何防止“net::ERR_SPDY_PROTOCOL_ERROR 200”?
- hibernate-annotations - 方法 addAnnotatedClass(Class
) 对于 Configuration 类型未定义 - java - 如何使用 jpa 枚举映射 Spring boot 为什么不在 DB 中保存枚举值在 DB 中保存枚举键
- amazon-web-services - AWS Codestar 在不破坏任何东西的情况下添加 RDS Postgres 数据库的正确方法
- c# - how to return two integer values in c#
- c# - MVC DropdownlistFor 在 null 上不恢复为默认值