0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Flutter/Dart】The Flutter Daemon has terminated のエラーに遭遇した際の対処法

Posted at

Flutterでアプリを開発中に下記のエラーがでて、エミュレータ(ios/Andoroidどちらも)が全く立ち上がらなくなるという事象に遭遇しました....
(IDEはVisual Studio Codeです)

開発環境

❯ flutter --version
Flutter 1.22.6 • channel unknown • unknown source
Framework • revision 9b2d32b605 (8 weeks ago) • 2021-01-22 14:36:39 -0800
Engine • revision 2f0af37152
Tools • Dart 2.10.5

とりあえずflutter doctor -v してみる

flutter doctor -v      
[✓] Flutter (Channel master, 1.26.0-13.0.pre.44, on macOS 11.1 20C69 darwin-x64, locale ja-JP)
    • Flutter version 1.26.0-13.0.pre.44 at /Users/hogehoge/develop/flutter
    • Framework revision 319d3a511c (9 weeks ago), 2021-01-16 01:14:04 -0500
    • Engine revision a243f4df07
    • Dart version 2.12.0 (build 2.12.0-229.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/hogehogeLibrary/Android/sdk
    • Platform android-30, build-tools 30.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_242-release-1644-b3-6915495)
    • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1
[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.54.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.20.0
[✓] Connected device (2 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Chrome (web)            • chrome        • web-javascript • Google Chrome 89.0.4389.90
    ! Error: iPhone is not connected. Xcode will continue when iPhone is connected. (code -13)
• No issues found!

異常はなさそう....

その後、flutter downgradeflutter daemon -vflutter upgrade
stableチャネルから変更してみる、など試みるも解消しませんでした....

結論

使用しているVisual Studio Codeをアンインストールすることで、エミュレータを立ち上げることができました!
通常のアンインストールではダメで、拡張機能などの設定も消去するように完全にアンインストールしないと変わりませんでした!

参考

githubのissueは同じ問題に遭遇しているユーザーがいたりするので、便利ですね!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?