Android Basics Getting Started tutorial--1.2.1 using Eclipse + ADT + SDK to develop Android APP
tags (space delimited): Android Basics Getting Started Tutorial
1. Preface
Here we have two paths to choose from, directly using the encapsulated ADT Bundle for Android, or configuring it Yourself
Since Google has abandoned the ADT Update, the official web site also cancels the download link, which provides Google with the latest version of the update before discarding the
ADT bundle for everyone to download!
2. Direct use of packaged eclipse
32-bit version:adt-bundle-windows-x86-20140702.zip
64-bit version:adt-bundle-windows-x86_64-20140702.zip
Download unzip, then jump directly to 4. To create a HelloWorld project!
3. Configure Eclipse + ADT + SDK Yourself
Eclipse can download it by itself: Eclipse official Download
The SDK and ADT can be downloaded at Androiddevtools: Androiddevtools official website
This gives us a lot of Android development related tools, and do not have to flip the wall, must develop the site! Be sure to mark!
There may be some problems between different versions of the configuration! I use the old version of the (very old), but also need to download:
Eclipse:eclipse-jee-helios-win32.zip
Adt:adt-15.0.0.zip
Sdk:android-sdk-windows.rar
Construction process:
1. Unzip Eclipse:Locate the Eclipse.exe run in the Unpacked folder and set the location of the project Code (workspace) after running.
2.ADT Configuration:Click the menu bar: Help-Install new software-ADD-Local ...-Select the folder where you downloaded the pressurized ADT-Accept-Restart Eclipse-See if the menu bar appears with Android small iconsIf it appears that the installation is complete
PS: The period may appear a waring, direct neglect ~
3.SDK Decompression Configuration:Click the menu bar:Windows-rreferences-Android-Select the Unpacked SDK package-OK-turn on re-authentication
4. Create an AVD (Android simulator):Click the menu bar:Mobile Small Icon-New-Selected system version-Skin Screen Resolution-set the size of the SD card-Complete-start can!
PS:The first time you start the AVD, it may be slow, and so on.
4. First program HelloWorld project creation and operation
Android App 1.New, Project
If not found, you can go to other----Android found, is the same:
2. Then enter the project information in turn:
3. Run the Created program
4. From the simulator to see the effect of the operation:
5. Project directory Structure analysis
Let's take a look at our engineering catalogue:
Next we need to know the parts:
- src directory: contains all the program code files required by the app, and most of the time we write our Java code here
- Gen Directory: only focus on the R.java file, it is automatically generated by ADT, which defines an R class, can be regarded as an ID (resource number) of the dictionary, including the user interface, graphics, strings and other resources of the ID, and we usually use resources also through the R file to invoke, At the same time, the compiler will look at this resource list, the unused resources will not be compiled, can save space for the app
- Assets Directory: resources are stored and no resource IDs are generated under R.java files, access is required using the Assetsmanager class
- Libs Directory: store some jar packages, such as V4,V7 's compatibility Pack, or some third-party packages
- Res Resource directory: storage of resources, drawable: storage of picture resources; layout: An XML file that stores the layouts of the interface;
Values: A description file that contains parameters that use XML format, such as String.xml string, color.xml color, style.xml style style, etc.
- Androidmanifest.xml Profile: A System control file that tells the Android app about basic information, such as components, resources, and required permissions, as well as a compatible minimum version of the SDK, etc.
6. A few common views
Click on the menu bar: Windows-A show view to open the corresponding views:
Click on other and the following are some common views of Android:
In fact, the main or logcat use, because unlike Java, our app runs on the virtual machine, and our console does not display the relevant information, only the installation state, so we will be on the Logcat to see the program running log information:
7. Summary of this section
In this section we learned to use Eclipse to build our Android development environment, lazy version and hands-on version, both can;
We then introduced some information about the directory structure of the Eclipse development Android project, and in the next section we will delve into the HelloWorld project to learn the code!
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Android Basics Getting Started tutorial--1.2.1 using Eclipse + ADT + SDK to develop Android APP