7

I am getting this warning every time I open VS code. Are there any ways to solve this problem? Thank you.

enter image description here

I added the log of this warning. I have tried flutter clean and flutter doctor and everything is fine, but this warning still appear every time I open VS Code. I also faced a problem where VS Code show no device no the status bar but when I run flutter devices it shows that there are 3 active devices. Thank you.

[12:07:27 pm] [General] [Info]         C:\Program Files\Intel\iCLS Client\bin
[12:07:27 pm] [General] [Info]         C:\windows\system32
[12:07:27 pm] [General] [Info]         C:\windows\system32\bin
[12:07:27 pm] [General] [Info]         C:\windows
[12:07:27 pm] [General] [Info]         C:\windows\bin
[12:07:27 pm] [General] [Info]         C:\windows\System32\Wbem
[12:07:27 pm] [General] [Info]         C:\windows\System32\Wbem\bin
[12:07:27 pm] [General] [Info]         C:\windows\System32\WindowsPowerShell\v1.0\
[12:07:27 pm] [General] [Info]         C:\windows\System32\WindowsPowerShell\v1.0\bin
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common\bin
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
[12:07:27 pm] [General] [Info]         C:\Program Files\Intel\Intel(R) Management Engine Components\DAL\bin
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
[12:07:27 pm] [General] [Info]         C:\Program Files\Intel\Intel(R) Management Engine Components\IPT\bin
[12:07:27 pm] [General] [Info]         C:\WINDOWS\system32
[12:07:27 pm] [General] [Info]         C:\WINDOWS\system32\bin
[12:07:27 pm] [General] [Info]         C:\WINDOWS
[12:07:27 pm] [General] [Info]         C:\WINDOWS\bin
[12:07:27 pm] [General] [Info]         C:\WINDOWS\System32\Wbem
[12:07:27 pm] [General] [Info]         C:\WINDOWS\System32\Wbem\bin
[12:07:27 pm] [General] [Info]         C:\WINDOWS\System32\WindowsPowerShell\v1.0\
[12:07:27 pm] [General] [Info]         C:\WINDOWS\System32\WindowsPowerShell\v1.0\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\MATLAB\R2018a\bin
[12:07:27 pm] [General] [Info]         C:\WINDOWS\System32\OpenSSH\
[12:07:27 pm] [General] [Info]         C:\WINDOWS\System32\OpenSSH\bin
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Brackets\command
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Brackets\command\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\PuTTY\
[12:07:27 pm] [General] [Info]         C:\Program Files\PuTTY\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\nodejs\
[12:07:27 pm] [General] [Info]         C:\Program Files\nodejs\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\Git\cmd
[12:07:27 pm] [General] [Info]         C:\Program Files\Git\cmd\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\dotnet\
[12:07:27 pm] [General] [Info]         C:\Program Files\dotnet\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\Go\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\Docker\Docker\resources\bin
[12:07:27 pm] [General] [Info]         C:\ProgramData\DockerDesktop\version-bin
[12:07:27 pm] [General] [Info]         C:\ProgramData\DockerDesktop\version-bin\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Programs\Python\Python39\Scripts
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Programs\Python\Python39\Scripts\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Programs\Python\Python39
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Programs\Python\Python39\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Microsoft\WindowsApps
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Microsoft\WindowsApps\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Roaming\npm
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Roaming\npm\bin
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Vim\vim82
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Vim\vim82\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\mosquitto
[12:07:27 pm] [General] [Info]         C:\Program Files\mosquitto\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.14\sbin
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\GnuWin32\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\OpenSSL-Win64
[12:07:27 pm] [General] [Info]         C:\Program Files\OpenSSL-Win64\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\OpenSSL-Win64\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\Handle
[12:07:27 pm] [General] [Info]         C:\Program Files\Handle\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\JetBrains\PyCharm Community Edition 2021.1.1\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\flutter\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\go\bin
[12:07:27 pm] [General] [Info]         C:\Chrome Driver Win32
[12:07:27 pm] [General] [Info]         C:\Chrome Driver Win32\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\PostgreSQL\13\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Programs\Microsoft VS Code\bin
[12:07:27 pm] [General] [Info]     Found at:
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\flutter\bin\
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\flutter\bin
[12:07:27 pm] [General] [Info]     Candidate paths to be post-filtered:
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\flutter
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\flutter
[12:07:27 pm] [General] [Info]     Found at C:\Users\nurfa\flutter
[12:07:27 pm] [General] [Info]     Returning SDK path C:\Users\nurfa\flutter for flutter.bat
[12:07:27 pm] [General] [Info] Searching for dart.exe
[12:07:27 pm] [General] [Info]     Looking for dart.exe in:
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\flutter\bin\cache\dart-sdk
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\flutter\bin\cache\dart-sdk\bin
[12:07:27 pm] [General] [Info]         C:\ProgramData\Oracle\Java\javapath
[12:07:27 pm] [General] [Info]         C:\ProgramData\Oracle\Java\javapath\bin
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Intel\iCLS Client\
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Intel\iCLS Client\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\Intel\iCLS Client\
[12:07:27 pm] [General] [Info]         C:\Program Files\Intel\iCLS Client\bin
[12:07:27 pm] [General] [Info]         C:\windows\system32
[12:07:27 pm] [General] [Info]         C:\windows\system32\bin
[12:07:27 pm] [General] [Info]         C:\windows
[12:07:27 pm] [General] [Info]         C:\windows\bin
[12:07:27 pm] [General] [Info]         C:\windows\System32\Wbem
[12:07:27 pm] [General] [Info]         C:\windows\System32\Wbem\bin
[12:07:27 pm] [General] [Info]         C:\windows\System32\WindowsPowerShell\v1.0\
[12:07:27 pm] [General] [Info]         C:\windows\System32\WindowsPowerShell\v1.0\bin
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common\bin
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
[12:07:27 pm] [General] [Info]         C:\Program Files\Intel\Intel(R) Management Engine Components\DAL\bin
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
[12:07:27 pm] [General] [Info]         C:\Program Files\Intel\Intel(R) Management Engine Components\IPT\bin
[12:07:27 pm] [General] [Info]         C:\WINDOWS\system32
[12:07:27 pm] [General] [Info]         C:\WINDOWS\system32\bin
[12:07:27 pm] [General] [Info]         C:\WINDOWS
[12:07:27 pm] [General] [Info]         C:\WINDOWS\bin
[12:07:27 pm] [General] [Info]         C:\WINDOWS\System32\Wbem
[12:07:27 pm] [General] [Info]         C:\WINDOWS\System32\Wbem\bin
[12:07:27 pm] [General] [Info]         C:\WINDOWS\System32\WindowsPowerShell\v1.0\
[12:07:27 pm] [General] [Info]         C:\WINDOWS\System32\WindowsPowerShell\v1.0\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\MATLAB\R2018a\bin
[12:07:27 pm] [General] [Info]         C:\WINDOWS\System32\OpenSSH\
[12:07:27 pm] [General] [Info]         C:\WINDOWS\System32\OpenSSH\bin
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Brackets\command
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Brackets\command\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\PuTTY\
[12:07:27 pm] [General] [Info]         C:\Program Files\PuTTY\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\nodejs\
[12:07:27 pm] [General] [Info]         C:\Program Files\nodejs\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\Git\cmd
[12:07:27 pm] [General] [Info]         C:\Program Files\Git\cmd\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\dotnet\
[12:07:27 pm] [General] [Info]         C:\Program Files\dotnet\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\Go\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\Docker\Docker\resources\bin
[12:07:27 pm] [General] [Info]         C:\ProgramData\DockerDesktop\version-bin
[12:07:27 pm] [General] [Info]         C:\ProgramData\DockerDesktop\version-bin\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Programs\Python\Python39\Scripts
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Programs\Python\Python39\Scripts\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Programs\Python\Python39
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Programs\Python\Python39\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Microsoft\WindowsApps
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Microsoft\WindowsApps\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Roaming\npm
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Roaming\npm\bin
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Vim\vim82
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\Vim\vim82\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\mosquitto
[12:07:27 pm] [General] [Info]         C:\Program Files\mosquitto\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.14\sbin
[12:07:27 pm] [General] [Info]         C:\Program Files (x86)\GnuWin32\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\OpenSSL-Win64
[12:07:27 pm] [General] [Info]         C:\Program Files\OpenSSL-Win64\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\OpenSSL-Win64\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\Handle
[12:07:27 pm] [General] [Info]         C:\Program Files\Handle\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\JetBrains\PyCharm Community Edition 2021.1.1\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\flutter\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\go\bin
[12:07:27 pm] [General] [Info]         C:\Chrome Driver Win32
[12:07:27 pm] [General] [Info]         C:\Chrome Driver Win32\bin
[12:07:27 pm] [General] [Info]         C:\Program Files\PostgreSQL\13\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\AppData\Local\Programs\Microsoft VS Code\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\flutter\bin\cache\dart-sdk
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\flutter\bin\cache\dart-sdk\bin
[12:07:27 pm] [General] [Info]     Found at:
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\flutter\bin\cache\dart-sdk\bin
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\flutter\bin\cache\dart-sdk\bin
[12:07:27 pm] [General] [Info]     Candidate paths to be post-filtered:
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\flutter\bin\cache\dart-sdk
[12:07:27 pm] [General] [Info]         C:\Users\nurfa\flutter\bin\cache\dart-sdk
[12:07:27 pm] [General] [Info]     Found at C:\Users\nurfa\flutter\bin\cache\dart-sdk
[12:07:27 pm] [General] [Info]     Returning SDK path C:\Users\nurfa\flutter\bin\cache\dart-sdk for dart.exe
[12:07:27 pm] [General] [Info] Experiment random number is 55 for experiement 'lsp-default'. Experiment is enabled for <= 100
[12:07:27 pm] [General] [Info] Experiment 'lsp-default' is activating (not first time)
[12:07:27 pm] [General] [Info] !! PLEASE REVIEW THIS LOG FOR SENSITIVE INFORMATION BEFORE SHARING !!

Dart Code extension: 3.25.1
Flutter extension: 3.25.0 (not activated)

App: Visual Studio Code
Version: 1.59.0
Platform: win

Workspace type: Flutter
Analyzer type: LSP
Multi-root?: false

Dart SDK:
    Loc: C:\Users\nurfa\flutter\bin\cache\dart-sdk
    Ver: 2.13.4
Flutter SDK:
    Loc: C:\Users\nurfa\flutter
    Ver: 2.2.3

HTTP_PROXY: undefined
NO_PROXY: undefined
[12:07:27 pm] [FlutterDaemon] [Info] Spawning C:\Users\nurfa\flutter\bin\flutter.bat with args ["--no-sound-null-safety","daemon"]
[12:07:27 pm] [FlutterDaemon] [Info] ..  in C:\Users\nurfa\flutter
[12:07:27 pm] [FlutterDaemon] [Info] ..  with {"toolEnv":{"FLUTTER_HOST":"VSCode","PUB_ENVIRONMENT":"vscode.dart-code"}}
[12:07:27 pm] [FlutterDaemon] [Info]     PID: 39588
[12:07:27 pm] [FlutterDaemon] [Info] ==> [{"id":"1","method":"emulator.getEmulators"}]
[12:07:27 pm] [General] [Info] Spawning C:\Users\nurfa\flutter\bin\cache\dart-sdk\bin\pub.bat with args ["global","list"]
[12:07:27 pm] [CommandProcesses] [Info] (PROC 12148) Logging data for process...
[12:07:27 pm] [Analyzer] [Info] Spawning C:\Users\nurfa\flutter\bin\cache\dart-sdk\bin\dart.exe with args ["C:\\Users\\nurfa\\flutter\\bin\\cache\\dart-sdk\\bin\\snapshots\\analysis_server.dart.snapshot","--lsp","--client-id=VS-Code","--client-version=3.25.1"]
[12:07:27 pm] [Analyzer] [Info]     PID: 63952
[12:07:27 pm] [General] [Info] Activating Flutter extension for Flutter project...
[12:07:27 pm] [General] [Info] Extension:Startup timing: 58503ms
[12:07:27 pm] [Analyzer] [Info] ==> Content-Length: 4900
[12:07:27 pm] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":39588,"clientInfo":{"name":"Visual Studio Code","version":"1.59.0"},"locale":"en-us","rootPath":"c:\\Users\\nurfa\\Desktop\\tracker_fisherman","rootUri":"file:///c%3A/Users/nurfa/Desktop/tracker_fisherman","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"changeAnnotati…
[12:07:28 pm] [General] [Info] !! PLEASE REVIEW THIS LOG FOR SENSITIVE INFORMATION BEFORE SHARING !!

Dart Code extension: 3.25.1
Flutter extension: 3.25.0 (activated)

App: Visual Studio Code
Version: 1.59.0
Platform: win

Workspace type: Flutter
Analyzer type: LSP
Multi-root?: false

Dart SDK:
    Loc: C:\Users\nurfa\flutter\bin\cache\dart-sdk
    Ver: 2.13.4
Flutter SDK:
    Loc: C:\Users\nurfa\flutter
    Ver: 2.2.3

HTTP_PROXY: undefined
NO_PROXY: undefined
[12:07:28 pm] [CommandProcesses] [Info] (PROC 12148) devtools 2.5.0
[12:07:28 pm] [General] [Info] Found 0 folders requiring "pub get":
[12:07:28 pm] [CommandProcesses] [Info] (PROC 12148) exited (0, null)
[12:07:28 pm] [CommandProcesses] [Info] (PROC 12148) closed (0, null)
[12:07:28 pm] [General] [Info] devtools version 2.5.0 appears to be latest so returning Valid
[12:07:28 pm] [DevTools] [Info] Spawning C:\Users\nurfa\flutter\bin\cache\dart-sdk\bin\pub.bat with args ["global","run","devtools","--machine","--try-ports","10","--allow-embedding"]
[12:07:28 pm] [DevTools] [Info] ..  with {"toolEnv":{"FLUTTER_HOST":"VSCode","PUB_ENVIRONMENT":"vscode.dart-code"}}
[12:07:28 pm] [DevTools] [Info]     PID: 39588
[12:07:35 pm] [Analyzer] [Info] <== Content-Length: 384
Content-Type: application/vscode-jsonrpc; charset=utf-8

{"id":0,"jsonrpc":"2.0","result":{"capabilities":{"executeCommandProvider":{"commands":["edit.sortMembers","edit.organizeImports","edit.sendWorkspaceEdit","refactor.perform"],"workDoneProgress":true},"workspaceSymbolProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}}},"serverInfo":{"name":"Dart SDK LSP Analysis Server","version":"2.13.4"}}}
[12:07:35 pm] [DevTools] [Info] <== {"event":"server.started","method":"server.started","params":{"host":"127.0.0.1","port":9100,"pid":61224,"protocolVersion":"1.1.0"}}
Anonymous
  • 83
  • 1
  • 1
  • 8

8 Answers8

8

Search for dart.flutterAdditionalArgs in your vs code settings.

and remove args against it.

Chand Abdullah
  • 429
  • 6
  • 13
1

Ive resolved this error with the below Steps:

  1. Go to {C://Users/{Name}/.gradle} - Delete the .gradle file.

  2. Then Download and install the same flutter and dart SDK version in some other location and set the environment variables.

Example:

Environment variables Before : ("D:\FlutterExtractedFiles\flutter\bin") ("D:\FlutterExtractedFiles\flutter\bin\cache\dart-sdk\bin")

Environment variables After : ("C:\edgedownloads\flutter_windows_v1.12.13+hotfix.8-stable\flutter\bin") ("C:\edgedownloads\flutter_windows_v1.12.13+hotfix.8-stable\flutter\bin\cache\dart-sdk\bin")

  1. Then kindly check the android studio Event Log

enter image description here

ramkumar
  • 226
  • 3
  • 9
0

See this post here that I have edited.

Please always post your error logs as text and not images.

1- run flutter clean then flutter doctor and build again.

2- Are you running it on a simulator or physical device?

3- If on a simulator, increase that device's virtual ram. Better more, delete the simulator and create a new one.

4- If still doesn't work, run a flutter upgrade.

5- Can you build the file as an APK? in other words, not to run on a device?

6- Please post the output of flutter build apk -v.

Amir Charkhi
  • 768
  • 7
  • 23
0

do these general steps:

  1. run flutter clean
  2. run flutter doctor
  3. if you are using an emulator make sure it has enough space and also try to wipe its data and cold reboot.
  4. then rerun your project.
Abbasihsn
  • 2,075
  • 1
  • 7
  • 17
0

If the above did'nt work then go to Android Studio , Uninstall all the sdk tools you have installed ,then reinstall it

brown
  • 31
  • 1
  • 7
0

Put Explicit Web Port in Profile Not Settings

If you are experiencing the Flutter Daemon failed to Start error as I did only after setting an explicit port for web view:

  1. Delete the --web-port line in VS Code Settings (Ctrl-,):
DELETE->> "dart.flutterAdditionalArgs": ["--web-port", "4593"]
  1. Open .vscode/launch.json and add the port to the "args" property in your launch profile, for example:
{  "version": "0.2.0",
  "configurations": [
    {
      "name": "launch-chrome",
      "cwd": "cli",
      "request": "launch",
      "type": "dart",
ADD->> "args": [
        "--web-port", "4395", "-dchrome"
      ],
      "program": "${file}"

    }
  ]
}

I was developing for the Web and per this stackoverflow answer specified the port explicitly in VS Code Settings and found that for some reason Flutter Daemon doesn't like this on startup.

The port is still honored but no Flutter Daemon failure error.

Using Windows 10.

CoderBlue
  • 695
  • 7
  • 14
0

I had the same struggle and non of the answers above worked for me. After searching for quite a long time I noticed that some permissions are handled differently by default with the latest macOS versions. After fixing the permission issues and restarting VS Code it started working just fine.

In my case I had to run these commands in the VS Code terminal:

sudo chown -R $(whoami) /Users/[MYUSERNAME]/Documents/flutter

(change the path accordingly where you downloaded or cloned the flutter sdk - but use the parent folder and not "/bin" like in your paths file)

and secondly:

sudo chown -R $(whoami) /Users/[MYUSERNAME]/.pub-cache

Hopefully this helps someone out there, too :-)

Felix Mittermeier
  • 183
  • 1
  • 2
  • 11
  • `chown` changes file ownership, you state (if I read you right) *default handling of permissions differs* - can you spell out the connection? – greybeard Mar 06 '22 at 11:13
  • @greybeard Yeah I meant the default access permissions of newly created folders in these mac directories seems to be different than with older versions of it. Back then it was the default that every user could also write into this directories while they can now only read. Due to the fact that the flutter deamon needs to write into the named folders it failed to start and after changing the ownership/permission it is not an issue anymore. – Felix Mittermeier Mar 06 '22 at 11:19
0

Try ReDownloading android Platform tools

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 09 '22 at 21:25