Android Configuration Environment variables

Source: Internet
Author: User

When creating an AVD, entering Android list targets under DOS will appear that Android is not an internal or external command,-1. This is mainly 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). Go directly to the directory where the Android SDK is located (in fact, you can go directly to the directory execution file without configuring environment variables)

Method One: Configure the Android SDK environment variable to use the Android SDK I installed as an example (E:\ANDROID-SDK), 2.

Create a new android_home where the system environment variable is set (right-click My Computer –> Property –> Advanced –> environment variable –> system variable –> new, note that "system variable" instead of " Administrator user variable ")

1). android_home=e:\android-sdk(the directory where the ANDROID SDK is located),-3;

2). Add %android_home%\tools to path, and be careful not to change other file paths, just add the semicolon,-4.

In the case of version 2.3, if you want to execute the ADB command on any command line, you also need to include%android_home%\platform-tools in Path , that is,%android_home%\tools and%android_home %\platform-tools simultaneously joins the path, theTools directory runs the android command, and the Platform-tools directory runs the ADB command, -4.

Figure-2 Android SDK installation directory

Figure 3 Configuring the Android SDK environment variables

Figure 4 Configuring path in the environment variables of the system

Figure 5 Performing Android commands after configuring environment variables

Method Two: Execute files directly into the installation directory

Android commands are 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 commonly used adb command in the E:\android-sdk\platform-tools directory, and need to go into that 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 perform 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 find the appropriate file command according to the specific directory. [......]

Android Configuration Environment variables

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.