我正在尝试运行由创建的应用程序flutter create first_try(并且我未对代码进行任何更改)。
我使用的是Mac上运行的最高版本Xcode 9.4。
如果我运行flutter run,它可以正常运行,并且可以很好地出现在iOS模拟器中。
如果我在IntelliJ下运行它,请使用“运行”按钮(绿色三角形),它可以正常运行,但是无法进行热重装等。
如果我使用“调试”按钮(绿色错误)在IntelliJ下运行它,它将在模拟器中打开,但仅显示白屏。
我在IntelliJ窗口中收到以下消息:
Launching lib/main.dart on iPhone X in debug mode...
log: Must be admin to run 'stream' command
Script started, output file is /dev/null
Script done, output file is /dev/null
Starting Xcode build...
Xcode build done.
Run Code Online (Sandbox Code Playgroud)
我尝试运行flutter clean,但没有帮助。
这是的输出flutter doctor -v:
$ flutter doctor -v
[?] Flutter (Channel beta, v0.4.4, on Mac OS X 10.13.5 17F77, locale en-US)
• Flutter version 0.4.4 at /Volumes/Second/Chris/hacks/flutter/flutter
• Framework revision f9bb4289e9 (4 weeks ago), 2018-05-11 21:44:54 -0700
• Engine revision 06afdfe54e
• Dart version 2.0.0-dev.54.0.flutter-46ab040e58
[!] Android toolchain - develop for Android devices (Android SDK 28.0.0)
• Android SDK at /Users/chris/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.0
• Java binary at: /Users/chris/hacks/flutter/jdk-10.0.1.jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 10.0.1+10)
? Android license status unknown.
[?] iOS toolchain - develop for iOS devices (Xcode 9.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.4, Build version 9F1027a
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[?] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
[?] IntelliJ IDEA Community Edition (version 2018.1.4)
• IntelliJ at /Users/chris/Applications/IntelliJ IDEA CE.app
• Flutter plugin version 25.0.2
• Dart plugin version 181.4892.1
[!] VS Code (version 1.24.0)
• VS Code at /Users/chris/Applications/Visual Studio Code.app/Contents
• Dart Code extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.dart-code
[?] Connected devices (1 available)
• iPhone X • D34D5096-B3F9-4930-822B-48D3BD71B83D • ios • iOS 11.4 (simulator)
! Doctor found issues in 3 categories.
Run Code Online (Sandbox Code Playgroud)
小智 2
可能是以下几件事,您可能会发现一些有用的东西:
1.) 尝试重新启动计算机
2.) 一些参考资料:
https://github.com/flutter/flutter-intellij
https://plugins.jetbrains.com/plugin/9212-flutter
3.)检查你的日志输出 flutter doctor -v
4.) 确保一切都是最新的
5.) 使用 flutter channel 命令检查你的 flutter 通道,也许可以尝试 flutter channel master
6.) 尝试flutter升级
7.) 甚至可以尝试安装 flutter doctor 所说缺失的其他所有内容。
我目前正在尝试使用 Android 设备而不是 iOS 来学习 Flutter
| 归档时间: |
|
| 查看次数: |
2226 次 |
| 最近记录: |