I am taking this erros with flutter doctor.I wrote 2 code to CMD and I broke my android studio dir.How can ı repair it ? Which 2 code I should write to CMD ?enter image description here


Solution 1: Akif

Uninstall Android Studio and re-install it. After that install the Flutter and Dart plugins as mentioned here.

  Install the Flutter and Dart plugins
  To install these:

  Start Android Studio.
  Open plugin preferences (Configure > Plugins as of v3.6.3.0 or later).
  Select the Flutter plugin and click Install.
  Click Yes when prompted to install the Dart plugin.
  Click Restart when prompted.


Solution 2: chris-profico

I think you have tried installing the latest version of Android Studio (4.0.1) and version (1.22.1 or lower) of Flutter. But Android Studio (4.0.1) moved the location of the .home file on Windows which is used to located the install directory.

You tried to fix the problem using the command:

flutter config --android-studio-dir = C:\Program Files\Android\Android Studio

Which unfortunately does not work because of empty space which breaks the tree structure

To resolve this, type the command below which will reset the default.

flutter config --android-studio-dir=""

and upgrade Flutter to version (1.22.2) to resolve Android Studio localization issue


Solution 3: fran garcia

Type this into the plugin:

flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"


Solution 4: Pramod

I was stuck with the same problem and whatever I did wouldn't solve the issue. My advise to you would be

  1. Run on separate command prompt window and not in Visual studio code integrated cmd terminal.

  2. Remove flutter bin path from PATH environment variable and run the flutter command again from a cmd window with entire path. This solved my issue. After this step, I included flutter bin path into environment variable again.


Solution 5: Mustafa Şahin

To fix this error, open cmd and enter the codes below in order:

flutter channel dev
flutter channel updrade
flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"

This may fix your Studio and Flutter paths.


Solution 6: Aliyah Hussein

try doing: flutter config --android-studio-dir "C:\Program Files\Android\Android Studio"


Solution 7: Asif Shaikat

As said by other developers running this command flutter config --android-studio-dir="C:\Program Files\Android\Android Studio" that issue got resolved for me. I am running Microsoft windows 10.enter image description here