Research on Android development environment construction diary and embedded Android development environment

Source: Internet
Author: User
<span id="Label3"></p>Thank you very much for the blog park, according to your blog, but also the use of Baidu and Google gradually set up the development environment of android, just to their own backup reference to view, read the people can ignore this article. Most of this article refers To: http://www.cnblogs.com/zoupeiyang/p/4034517.html, added the problem I encountered when I set up and my own solution, but also basically back up my own settings, for future Viewing. This tutorial will be divided into five steps to complete the deployment of an Android development Environment. First Step: Install the JDK. Step two: Configure the variable environment for the JDK on Windows. Step three: Download and install Eclipse. Fourth step: download and install the Android SDK. Fifth step: Install the ADT plugin for Eclipse. Sixth Step: test whether the Android development environment is built SUCCESSFULLY. Seventh step: test the embedded settings and the Android phone device to communicate with the WINDOW.<strong><strong>First Step: Install the JDK</strong></strong><strong><strong><br></strong></strong>To download the Oracle Company's jdk, Baidu "jdk" can enter the Oracle company JDK download page (the current download page address is http://www.oracle.com/technetwork/java/javase/downloads/ index.html), Select the corresponding version of your computer System. After downloading to your local computer, double-click to Install. After the JDK default installation succeeds, Two folders appear in the system directory, one for the JDK and one for the Jre. The full name of the JDK is the Java SE Development kit, the Java development toolkit. SE represents the standard Edition. The JDK is the core of java, containing the Java runtime (java runtime environment), a stack of Java tools, and a Java class library that is called when developers develop Applications. We can open the Bin directory under the Jdk's installation directory, which has many executable programs with suffixes named exe, which are the tools that the JDK contains. In the second step of configuring the Jdk's variable environment, we can easily invoke these tools and their commands. The JDK includes the following basic tools: the Javac:java compiler, which converts the source code into Bytecode. Jar: Package tool to package related class files into one File. Javadoc: document generator, Extracting documents from source Notes. jdb:debugger, Debug the Error-checking Tool. Java: run the compiled Java Program.<strong><strong> </strong></strong><strong><strong>Step two: Configure the variable environment for the JDK on Windows</strong></strong><strong><strong> </strong></strong>We open an application usually by double-clicking the application icon on the desktop or by clicking the menu link of the application in the system start menu, whether the shortcut icon for the desktop or the menu link contains the installation location information for the Application. When you open them, the system will follow these location information to locate the installation directory and start the Program. When the system is required to start an application, the system will first look in the current directory, if not the path specified in the system variable path to Find. We said earlier that the JDK contains a bunch of development tools that are located in the Jdk's installation directory, and in order to facilitate the use of these development tools, it is necessary to set the installation directory of the JDK to the system Variables. This is why you need to set the bin directory of the JDK as a system environment variable after installing the JDK in Windows. After installing Java, the path C:\ProgramData\Oracle\Java\javapath will be added automatically; To the path system environment variable, This default is Ok. In order to configure the system variable environment of the jdk, we need to set up three system variables, namely Java_home,path and Classpath. Here are the three variables that are set to guard Against.<strong><strong>Java_home</strong></strong>Set the system variable name first, and the variable value is the Jdk's installation path on your computer: C:\Program files\java\jdk1.8.0_20. Once created, you can use%java_home% as the unified Reference path for the JDK installation Directory.<strong><strong>Path</strong></strong>The Path property already exists, can be edited directly, appended with the original Variable:;%java_home%\bin;%java_home%\jre\bin.<strong><strong>CLASSPATH</strong></strong>Set the system variable name to: CLASSPATH variable Value is:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar. Note the variable value string is preceded by a "." Represents the current directory, the purpose of setting up classpath is to tell the Java execution environment, in which directories you can find the classes or packages that you need to execute the Java Program.<strong><strong>Step three: Download and install Eclipse</strong></strong>Eclipse is an IDE (integrated development Environment) developed for Java applications and ANDROID. Eclipse does not need to be installed, after the download unzip the package, cut the Eclipse folder to the place where you want to install, open when you set up your working directory. There are multiple versions of eclipse, and here you choose to download the Eclipse IDE for Java EE developers Version. (but I chose Eclipse IDE for Java developers, which should be the same): http://www.eclipse.org/downloads/<strong><strong>fourth step: download and install the Android SDK</strong></strong>With the JDK variable environment configured and Eclipse installed, the Java development environment is ready if you are just developing a common Java Application. We're going to develop Android apps through eclipse, so we need to download the Android SDK (software Development Kit) and install the ADT plugin in eclipse, which lets Eclipse and Android SDK to Associate. The Android SDK provides the API libraries needed to develop Android applications and the development tools needed to build, test, and debug Android Applications. Open Http://developer.android.com/sdk/index.html,Android Studio is integrated with eclipse, you can choose to download this, because I want to be familiar with eclipse, so choose to download Android separately Sdk<strong><strong> </strong></strong>After downloading, Double-click install, Specify the Android SDK installation directory, in order to facilitate the use of the Android SDK contains the development tools, we in the system environment variable path set the Android SDK installation directory under the Tools Directory. In the Android SDK installation directory, Double-click "SDK Manager.exe" to open the Android SDK Manager,android SDK Manage is responsible for downloading or updating different versions of the SDK package, we see the default installed Android SDK  The manager installs only one version of SDK Tools. Open the Android SDK Manager, which will get an installable version of the sdk, but there are walls in the country, sometimes there will be a failure to obtain. From the log window that pops up, we can see that the connection "https://dl-ssl.google.com" Failed. We ping the command, found that the network does not pass.<strong><strong>on the issue of invalid https://dl-ssl.google.com,</strong></strong><strong><strong>previous old methods are not feasible (modify host add two lines 203.208.46.146 dl.google.com 2 03.208.46.146 dl-ssl.google.com)</strong></strong><strong><strong>Personal suggestions Baidu this issue, and then choose the last two weeks or one months of search records, should be able to meet and solve your problem, but also as a routine to post some programs:</strong></strong>1. In the "Android SDK manager-settings" window, fill in Port"and 80 in The"http proxy server"and"http proxy mirrors.neusoft.edu.cn input boxes, and select " Force https://... sources to be fetched using Http://..."check box; 4. Click The"close"button to close the" Android SDK manager-settings "window to return to the main interface 2. Visit Http://tool.chinaz.com/webmaster Tools website, Select Super ping,dl-ssl.google.com paste up, This time you can see there are several can ping the IP address, choose the shortest (35ms~) with cmd Ping the IP address, for example (203.208.46.XXX), and then add the host to the old Method. 3. At present seems to be able to visit the domestic dl-ssl.google.com this web site, so some of the latest package may not need to deal with the line, so flexible processing, combined with a variety of ways to download the line! You only need to select the installation package you want to install or Update. This is a more time-consuming process, and there will be a failure to download, and the failed installation package will only need to be re-selected before it can be installed.<strong><strong>If you can not download the Android SDK by changing dns, There are two methods, the first one is to own a ladder fq, the second is downloaded from this site, the download address is: http://www.androiddevtools.cn/</strong></strong><strong><strong>Fifth step: Install the ADT plugin for Eclipse</strong></strong>We have already configured the Java development environment, installed the IDE to develop android, downloaded the Android sdk, but Eclipse has not been associated with the Android sdk, that is, they are now independent of each other, like a gun and bullets Separated. To make Android apps easier to create, run, and debug, Android's development team specifically customized a plugin for the Eclipse ide: Android development Tools (ADT). Here's How to install ADT online: start eclipse, Click on the Help menu, install New software ...?, Click Add in the popup dialog box ... Button.  Then enter in the location in the popup dialog: Http://dl-ssl.google.com/android/eclipse/,Name can enter ADT and click "ok" button.  In the dialog box that POPs up, Select the tool you want to install, and the next step is Ready.  After installation, you will be asked to restart Eclipse,eclipse will intelligently associate it with the Android SDK in the same directory according to the directory location, and if you have not installed any version of Android SDK through the SDK manager tool, it will alert you to install them immediately. If eclipse does not automatically correlate the installation directory of the Android sdk, you can select Windows---Preferences in the Open eclipse, and you will see the Android settings in the popup panel, filling in the installed SDK path,  The platform packages that you just installed in the SDK will appear, and you can complete the configuration by pressing OK. here, we build on the Android development environment on windows, when you use Eclipse's file--"new--" Project ...  When you create a new project, you'll see the option to build an Android Project. Setting System Environment variables<strong><strong>Android_sdk_home</strong></strong>Set this system variable name, the variable value is the installation path of the Android sdk: D:\Software\Android\android-sdk. Once created, you can use%android_sdk_home% as the unified Reference path for the JDK installation Directory.<strong><strong> <strong>Path</strong> </strong></strong>Append to the original variable;%android_sdk_home%\tools;%android_sdk_home%\platform-tools if all environment variables are set, cmd can enter the following three commands in the terminal java- VERSIONANDROID-HADB If there is information output, it proves that the environment variable is set successfully!<p><p><strong>Seventh step, embedded device and Windows communication</strong></p></p><p><p>New project, Setting</p></p><p><p></p></p><p><p>Connect an Android phone or embedded settings, and finally run as Android application, which appears:</p></p><strong><strong>Sixth step: test whether the Android system is built successfully</strong></strong><p><p>Create a new Android project using eclipse, as shown in the following steps:</p></p><p><p>  </p></p>Default on the line, all the way down, emulator<p><p>Research on Android development environment construction diary and embedded Android development environment</p></p></span>

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.