In Android development, adb is a very useful and useful tool. However, if the environment variable is not modified during use, it is troublesome to enter the full path every time, the solution is to add the path of the adb tool to the environment variable.
Windows Platform
On Windows, it is easier to modify environment variables by finding the path to the adb tool, such as C: // adt-bundle-mac-x86_64-20131030/sdk/platform-tools, assign a value to the Path, choose my computer> Properties> advanced system Settings> environment variables, find the Path in the system variables, and click Edit to copy the Path, note that you need to add a semicolon between the two paths, and then save and exit. The test method is to enter adb in the command line and the command error cannot be found.
MAC OS
Setting environment variables in the Apple system is a little troublesome, but it is similar. First, copy the path where the adb tool is located, such as:/Users/suduren/Desktop/adt-bundle-mac-x86_64-20131030/sdk/platform-tools, and then enter:
Touch. bash_profile press ENTER
Open-e. bash_profile, press ENTER
The environment variable editing interface appears. If this document is not empty, you only need to copy the path of adb. Note that a semicolon is added between the two paths.
If the shareholding environment variable is not empty, enter: export PATH = {$ PATH}: adb PATH in it and save and exit.
Enter source. bash_profile in the terminal, press enter, and enter adb. If no command is displayed, the adb environment variable is successfully written.
If you have reprinted the results of your hard work, please indicate the source. Thank you!