The configuration method of the ANDROID environment variable _android

Source: Internet
Author: User

When we create AVD, entering the Android list in the Command Line window prompts: ' Android ' is not an internal or external command, as in Figure 1, which is largely due to the lack of configuration of the Android SDK environment variables.

Figure 1 Android is not an internal or external command

There are two ways to solve this problem:

(1) Configure the environment variables of the Android SDK;

(2) Direct access to the Android SDK directory execution (in fact, you can not configure the environment variables directly into the directory execution file).

method One: Configure the Android SDK environment variable with the Android SDK I installed as an example (E:\ANDROID-SDK), as shown in Figure 2.

To set the system environment variable new Android_home (right click My Computer –> attribute –> advanced –> environment variable –> system variable –> new, note "System variable" instead of "User variable of administrator")

(1) android_home=e:\android-sdk (ANDROID SDK directory), as shown in Figure 3;

(2) Add%android_home%\tools in path, and be careful not to change other file paths, just add them after the semicolon, as shown in Figure 4.

If it is version 2.3 and you want to execute the ADB command on any command line, you will also need to add%android_home%\platform-tools to the path, that is,%android_home%\tools and%android_home%\ Platform-tools also joins the path, the tools directory runs the android command, and the Platform-tools directory runs the ADB command, as shown in Figure 4.

Figure-2 Android SDK installation directory

Figure 3 Configuring the Android SDK environment variable

Figure 4 Configuring path in the system's environment variables

Figure-5 Configure environment variables to execute Android command

Method Two: Directly in the access to the installation directory to execute the file

The android command is under the tools of the Android SDK, Android.bat, related commands, and ddms.bat,traceview.bat.

Figure 6 Direct access to the Android SDK tools execution file

Not all commands are in the tools directory, such as the common ADB command is in the E:\android-sdk\platform-tools directory, and need to enter the directory to execute. For example, the command to view the Android application log needs to go into the E:\android-sdk\platform-tools directory and execute the ADB logcat.

Of course, the above is the 2.3 version of the file directory, different versions of the directory structure may be slightly different, you need to be based on the specific directory to find the appropriate file commands.

The above is on the Android environment variable configuration method, follow-up continue to update the relevant information, thank you for your support of this site!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.