在有人向我指出此链接之前,我想提一下,我不认为这些是直接相关的。
可以看到,我的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 API PLATFORM
。Project Structure > Modules
中的所有依赖项都由Android找到。我从GitHub上的稳定分支克隆了颤振SKD。
有人知道为什么我的设置是这样的吗?
发布于 2021-03-24 17:15:55
关闭Android 并以管理员身份再次运行
发布于 2021-04-17 05:18:16
它解决了我的问题:
1-确保android中安装了颤振插件,您可以从文件> the > plugin安装插件。
2-从文件选择颤振SDK路径> setting>语言&框架>颤振。
发布于 2020-09-19 18:56:23
我以前也有同样的问题。
希望能为你工作。
https://stackoverflow.com/questions/61613113
复制相似问题