Quickly build the Android Development Environment ADT-Bundle and Hello World, androidadt-bundle

Source: Internet
Author: User
Tags android sdk manager

Quickly build the Android Development Environment ADT-Bundle and Hello World, androidadt-bundle
---- Download JDK (Java Dev Kit)
Download: http://www.oracle.com/technetwork/java/javase/downloads/index.html




Procedure: https://docs.oracle.com/javase/8/docs/

View after security
JDK and JRE different and meaning: http://www.pc6.com/infoview/Article_53547.html
1. JVM-java virtual machine! JVM is a common java virtual machine. It is the core of cross-platform java Implementation. All java programs are first compiled. class files are executed on virtual machines. That is to say, the class does not directly correspond to the operating system of the machine, but indirectly interacts with the operating system through the Virtual Machine. The virtual machine interprets the program to the local system for execution.
2. JRE-java runtime environment! JRE refers to the Java Runtime Environment, which is intended for Java program users rather than developers. like a PC, JRE requires the operating system to run the compiled Win32 application, and the compiled Java program also requires JRE to run. JVM alone cannot be completed yet. class file execution, in the explanation. the JVM needs to call the library lib. in the JDK installation directory, you can find the jre Directory, which contains two folders bin and lib. You can think that the bin contains JVM, And the lib contains the class library required for JVM work, the JVM and the class library are collectively called JRE. token ).
3. JDK-java development kit! JDK is an SDK for developers (the SDK is a Software Development Kit, which generally refers to a Software Development Kit, which can include function libraries and compiled programs). It provides a Java Development environment and a runtime environment. the JDK directory contains six folders: the src Class Library source code package and several other declaration files. The following four folders take effect when running java: bin(the most important one is the compiler javac.exe), include (header files used for java and JVM interaction), lib (Class Library), and jre (Java Runtime Environment ). now we can see that JDK contains JRE, and JRE contains JVM (Note: The bin and lib folders in the JDK folder are different from the bin and lib in the JRE folder, JDK is used for java program development, while JRE can only run classes without compilation.

After JDK installation, directly decompress JDK to drive C. Then, configure the environment (right-click "computer", "attribute", "Advanced System settings", and "environment variables ", configure the environment in the top 'xxx user variable' of the Environment Variable [XXX indicates the name you gave your computer] and click "CREATE" to start configuration, if JDK is installed on the G drive, please install your own installation path. Refer to your own configuration. Thank you !);
Configure environment variables, desktop-> Computer-> right-click Properties-> advanced system settings-> advanced-> environment variables-> adminstrator user variables (related to the user name ), create or edit a variable. (if it already exists, append the variable. If it does not exist, create the variable. Note that this variable must be used for append. The number is separated from the previous one)

Variable name: TEMP variable value: % USERPROFILE % \ AppData \ Local \ Temp (Please copy it directly)
Variable name: TMP variable value: % USERPROFILE % \ AppData \ Local \ Temp (Please copy it directly) variable name: JAVA_HOME variable value: C: \ Program Files \ Java \ jdk1.8.0 _ 25 (please do not add ";")
Variable name: CLASSPATH variable value:.; % JAVA_HOME % \ bin;
Variable name: PATH variable value :.; % JAVA_HOME % \ bin; D: \ Android \ eclipse-jee-juno-R-win32 \ android-sdk-windows \ tools (the environment variables of the SDK are written in advance)

Variable name: JAVA_HOME
Variable value: C: \ Java \ jdk1.7.0 _ 17
Variable name: ANDROID_SDK
Variable value: C: \ Java

Variable name: Path
Variable value:.; % JAVA_HOME % \ bin; C: \ Java \ adt-bundle-windows-x86 \ sdk \ tools; C: \ Java \ adt-bundle-windows-x86 \ sdk \ platform-tools
Variable name: CLASSPATH
Variable value:.; % JAVA_HOME % \ lib \ tools. jar; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib; (Note the previous. Number)


--- Test environment variables
Run cmd and enter "java-version" and "javac" to test whether the command is successful or not;

----------------- Download ADT-Bundle for Windows

ADT-Bundle is an integrated IDE officially provided by Google Android. It already contains the platform tools required by Eclipse, Android SDK, and Android, new users only need ADT-Bundle to quickly build an Android development environment. Https://developer.android.com/sdk/index.html#download

----------------- Install ADT-Bundle
Directly download the downloaded adt-bundle-windows-xxxXxxXx. Zip, decompress it to the location you need to install.
Decompress adt-bundle-windows-x86-20140702.zip (the file name may be slightly different because of the version). There are three parts in it:



--------------- Install the Android SDK

Run SDK Manager.exe. the SDK Manager is used to download other Android development-related components (if Eclipse is installed with the ADT plug-in, it can also be run from Window> Android SDK Manager ), select the API to download the Android version.

OpenSDK Manager.exe(You can also run eclipse/eclipse.exe and open it through Windows-> Android SDK Manager)






Check the Android version of the target mobile phone you want to develop. It is best to check it all, and then click Install Package to follow the prompt next. accept allows installation to wait (this is a slow process)


Step 5: Configure Android AVD (Virtual simulator)

Open Eclipse(Eclipse/eclipse.exe ).Windows-> Android Virtual Device MangerOpen the AVD manager.

ClickNew buttonCreate your new AVD. For example, I made a simple description. You can fill in the parameters as needed. Click OK.

The AVD you configured will be used as the default debugging tool for your Android Application. Of course, you can also configure multiple ones.

 

------------------ Create a Hello World project

PassFile-> New-> Android Application ProjectEnter Hello World (project name), next, and finish.


Run Eclipse and create an Android Application Project. By default, two files are automatically generated: one is the interface logic Java class and the other is the XML file described on the interface. Java class:
Interface Design XML file: you can modify and modify the file on this interface.


------------------- Run Hello World

Click Run Debug (F11 shortcut) to Run it in the simulator you configured.

 

Before running the SDK, you must set the Android AVD (Android Virtual Device), that is, the Android Virtual Device.
AVD is not defined here. You need to create a new one.
Define the virtual device brand, Android version, and related hardware configurations.






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.