Windows:
In Windows, setting your PATH and environment variables can be done by opening Control Panel and typing “Environment” and then clicking the “Edit the system environment variables” option. You’ll be presented with a list of environment variables including PATH where you can edit or add new ones.
Note: You should reboot your computer after making changes to PATH to ensure all processes (including explorer) are updated.
macOS:
The most reliable place to set PATHs seems to be in a file inside the /etc/path.d/ folder. It doesn’t matter what you call the file as all files inside this folder will be processed for paths. For example, you may wish to create a file at /etc/path.d/dart and add paths to your SDK(s) (one-per-line).
Setting environment variables in a way that applies in all cases appears to be complicated so you may wish to install your Android SDK in the default location to avoid the need to set ANDROID_HOME.
Note: You should reboot your computer after making changes to PATH to ensure all processes are updated.
Linux:
Setting PATH and environment variables from Linux will vary between distributions. If you know of a reliable way to set these please raise an issue with the details (including which distribution) so this page can be updated.
Note: You should reboot your computer after making changes to PATH to ensure all processes are updated.