从android studio终端运行flutter attach不起作用。显示错误Oops;flutter意外退出。
终端输出:
flutter attach
Checking for advertised Dart observatories...
Oops; flutter has exited unexpectedly.
Sending crash report to Google.
Crash report sent (report ID: 50ca8df4de508ad3)
Crash report written to /Users/johnnykuttymathew/Documents/Work/Code/<project>/flutter_04.log;如何避免这种情况?所有的项目都会发生这种情况。甚至是以前创建的项目。
颤动医生输出。
$ flutter doctor -v
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.4 18E226, locale en-DE)
• Flutter version 1.5.4-hotfix.2 at /usr/local/custom/flutter
• Framework revision 7a4c33425d (3 weeks ago), 2019-04-29 11:05:24 -0700
• Engine revision 52c7a1e849
• Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/johnnykuttymathew/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.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_152-release-1248-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2, Build version 10E125
• ios-deploy 1.9.4
• CocoaPods version 1.6.1
[✓] Android Studio (version 3.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 34.0.1
• Dart plugin version 182.5215
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[!] IntelliJ IDEA Ultimate Edition (version 2019.1.1)
• IntelliJ at /Applications/IntelliJ IDEA.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
• Dart plugin version 191.7019
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins
[✓] Connected device (1 available)
• iPhone Xʀ • 98882BC0-AF96-4B19-B530-78A7EFAA5DFF • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)
! Doctor found issues in 1 category.发布于 2019-06-07 04:34:45
要安装Flutter和Dart插件:
->启动Android Studio。
->打开插件首选项( macOS上的首选项>插件,Windows和Linux上的文件>设置>插件)。
->选择Browse repositories,选择Flutter插件并单击Install。
->当系统提示安装Dart插件时,单击是。
->出现提示时,单击重新启动。
发布于 2019-08-17 22:21:15
a)请仔细检查所有依赖组件是否正确安装。b)您还需要检查是否有多个android-sdk没有安装,如果是,卸载两个sdk可能会产生问题。c)如果设置为Android_Home,则重置Android-sdk路径(许多开发人员执行了此操作并将其修复) d)有时flutters依赖项会遇到权限问题,如果您是在Mac上,可以通过在终端上运行sudo su或在Windows上运行命令提示符来解决。
发布于 2020-06-15 14:41:12
尝试升级Flutter / Dart插件,并使用flutter channel stable将通道更改为稳定。
https://stackoverflow.com/questions/56239065
复制相似问题