I am getting below error while running even I set PATH of flutter C:\flutter\bin

flutter doctor command

CreateProcessW failed 5

Oops; flutter has exited unexpectedly. Sending crash report to Google. Crash report sent (report ID: 21537d77f83bb8de) CreateProcessW failed 5 CreateProcessW failed 5 CreateProcessW failed 5 Unhandled exception: ProcessException: Access is denied.

Command: C:\Program Files\Android\Android Studio\jre\bin\java.EXE -version

1 Answers

7
jitesh mohite On Best Solutions

After struggling so many hours into this issue, we find that flutter requires java.exe file while running application. So on some machines only administrator has only access to the file which resides in path C:\Program Files\Android\Android Studio\jre\bin\java.exe

The solution as follows:

  1. Run as administrator

    1. Go to C:\Program Files\Android\Android Studio\jre\bin\java.exe

    2. Right click and click Run as administrator

  2. Access permission

    1. Go to C:\Program Files\Android\Android Studio\jre\bin\java.exe

    2. Right click and go to properties

    3. Go to the security section

    4. Click system and edit the access permission make sure you gave it read/write/modify access.

That's it.

For more reference:

https://www.youtube.com/watch?v=ybn3uhVJfE0