所以我在机器A上使用IntelliJ Idea Community Edition
创建了一个Flutter
项目,然后将整个项目上传到GitHub。现在在机器B上通过在同一IDE中从GitHub克隆/检出,执行以下操作:
flutter packages get
flutter upgrade
- 设置dart路径和所有其他先决条件
但是,我仍然无法从IDE运行Flutter项目。我的意思是,我甚至不能按“运行”按钮。
我哪里做错了?
如果您愿意,可以尝试执行与我相同的步骤。这是Git存储库代码
编辑 我可以通过终端运行相同的项目。
[更新] 按照评论日志中Günter Zöchbauer的要求,这里是flutter doctor -v
的日志记录
BoringFlutterProject$ flutter doctor -v
[✓] Flutter (Channel dev, v0.5.8, on Linux, locale en_IN)
• Flutter version 0.5.8 at /home/daksh/flutter
• Framework revision e4b989bf3d (8 days ago), 2018-08-09 09:45:44 -0700
• Engine revision 3777931801
• Dart version 2.0.0-dev.69.5.flutter-eab492385c
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /home/daksh/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = /home/daksh/Android/Sdk
• Java binary at: /home/daksh/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.
[✓] Android Studio (version 3.1)
• Android Studio at /home/daksh/android-studio
• Flutter plugin version 25.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] IntelliJ IDEA Community Edition (version 2018.1)
• IntelliJ at /home/daksh/Downloads/idea-IC-181.5281.24
• Flutter plugin version 25.0.2
• Dart plugin version 181.4892.1
[✓] VS Code (version 1.26.0)
• VS Code at /usr/share/code
• Flutter extension version 2.17.1
[!] Connected devices
! No devices available
! Doctor found issues in 1 category.
我发布了这个问题,因为我相信我们中的许多人将面临同样的问题,就像我们过去在
AndroidStudio
中遇到一些问题一样。
pubspec.yaml
文件,并确认是否要求您为项目添加Dart支持。 同时,在终端窗口中尝试运行flutter run
。 - Günter Zöchbauer