In Android development, ADB is a very useful and useful tool, but when used without modifying environment variables, every time you need to enter a full path is cumbersome, the solution is to add the path of the ADB tool in the environment variable.
Windows platform
Under the Windows platform, it is easier to modify an environment variable by locating the path to the ADB tool, such as c://adt-bundle-mac-x86_64-20131030/sdk/platform-tools, and assigning the path Open My Computer, properties, advanced system settings, environment variables, find path in system variables, click Edit, copy the above path, note that two paths need a semicolon, and then save the exit. The test method is to enter ADB at the command line without prompting for an error that the command cannot be found.
MAC OS
The Apple system setting environment variables is a little more troublesome, but similar. First, the path where the ADB tool is located is copied, such as:/users/suduren/desktop/adt-bundle-mac-x86_64-20131030/sdk/platform-tools, then enter in the terminal:
Touch. Bash_profile Enter
Open-e. Bash_profile Enter
An environment variable editing interface appears, if the document is not empty, just need to copy the ADB path to the location, note that two paths to add a semicolon.
A stake in the environment variable is not empty, you need to enter in: Export path={$PATH}:adb path, save exit.
Terminal input: source. Bash_profile hit Enter, then enter ADB, and if no prompt is found, the ADB environment variable is written successfully.
Personal hard work results, if reproduced, please indicate the source, thank you!