Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

Android 開発 Flutter環境構築 Error: Unable to run "adb"

解決したいこと

現在、Androidアプリ開発を始めようと思い、flutterの環境構築を行っています。
flutterの環境が整ったかどうか確かめるために以下のコマンドを実行したところ以下のようなエラー発生しました

flutter doctor -v

エラー内容:

[☠] Connected device (the doctor check crashed)
    X Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know
      about this issue at https://github.com/flutter/flutter/issues.
    X Error: Unable to run "adb", check your Android SDK installation and ANDROID_HOME environment variable:
      C:\Users\taken\AppData\Local\Android\Sdk\platform-tools\adb.exe
      Error details: Process exited abnormally with exit code -1073741819:

    • #0      throwToolExit (package:flutter_tools/src/base/common.dart:34:3)
      #1      AndroidDevices.pollingGetDevices (package:flutter_tools/src/android/android_device_discovery.dart:75:7)
      <asynchronous suspension>
      #2      PollingDeviceDiscovery._populateDevices (package:flutter_tools/src/device.dart:531:36)
      <asynchronous suspension>
      #3      Future.wait.<anonymous closure> (dart:async/future.dart:528:21)
      <asynchronous suspension>
      #4      DeviceManager.refreshAllDevices (package:flutter_tools/src/device.dart:201:40)
      <asynchronous suspension>
      #5      DeviceValidator.validateImpl (package:flutter_tools/src/doctor.dart:770:34)
      <asynchronous suspension>
      #6      DoctorValidator.validate (package:flutter_tools/src/doctor_validator.dart:58:37)
      <asynchronous suspension>
      #7      Future.any.onValue (dart:async/future.dart:623:5)
      <asynchronous suspension>

このエラーを解消してconnected deviceが表示されるようにしたいです。

行った事

インストール

flutter SDKをインストールしJetBrainsのtoolBoxを利用してAndroid Studioをインストールしました。
その後、Android Studioで必要なSDKをインストールし、必要なSDK Toolも揃えました。

image.png

image.png

flutter doctorの実行結果

Visual Studioは入れていませんが、それ以外はうまくいっています。

image.png

自分で試したこと

  • PCの再起動
  • Toolの再インストール
  • firewallの無効化

他にコマンドプロンプトでadbを直接実行をしてみましたが、何も表示されませんでした。
image.png

なお、powershellで試したときはうまくいきました。
image.png

その他環境

image.png

0

No Answers yet.

Your answer might help someone💌