Android Basic Beginner Tutorial--1.2.1 using Eclipse + ADT + SDK to develop Android APP

Source: Internet
Author: User

Android Basic Beginner Tutorial--1.2.1 using Eclipse + ADT + SDK to develop Android APP

tags (space delimited): Android Basics Beginner Tutorial

1. Preface

Here we have two paths to choose, directly using the encapsulated ADT Bundle for developing Android, or configuring it Yourself
As Google has abandoned the ADT Update, the official web site also cancels the download link. Here is a copy of the latest version of Google's waiver before the update
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 helloworldproject!

3. Configure Eclipse + ADT + SDK Yourself

Eclipse can download it by itself: Eclipse official Download
and the SDK and ADT can be downloaded to Androiddevtools: Androiddevtools official site
Here we provide a lot of Android development related tools, and do not FQ, must develop the site! Be sure to mark!


There may be some problems with different version number configurations!

The author uses the old version number (very old), but also need to be able 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 execution in the extracted folder and set the location of the project Code (workspace) after execution
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 iconAssuming 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-Open another validation
4. Create an AVD (Android simulator):Click the menu bar:Mobile Small Icon-New-selected system version number-Skin Screen Resolution-set the size of the SD card-finished-start, you can .
PS:The first time you start the AVD, it can be very slow, it needs to wait ~

4. First program Helloworldproject creation and execution

Android App 1.New, Project
If not found, can go to other----Android found, is the same:

2. Then enter project information in turn:

3. Execute the Created program

4. See the execution effect from the simulator:

5. Folder structure analysis of the project

Let's take a look at our project folder diagram:

What we need to know next:

  • src folder: includes all the program code files required by the app, and most of the time we write our Java code here
  • Gen folder: just focus on the R.java file. It was initiated by ADT itself. It defines an R class. A dictionary that can be viewed as an ID (resource number). Includes the user interface. Graphics. The ID of a resource such as a string, and we usually use the resource also through the R file to invoke. At the same time, the compiler will look at this resource list, not practical resources will not be compiled, can save space for the app
  • Assets folder: resources are stored and no resource IDs are generated under R.java files, you need to use the Assetsmanager class for access
  • Libs folder: store Some jar packages, such as V4,V7 's compatibility Pack, or some third-party packages
  • Res Resource folder: storage of resources, drawable: storage of picture resources; layout: an arrangement file that stores the interface. are XML files;
    Values: Includes descriptive narrative files, such as string.xml strings, that use XML-formatted parameters. Color.xml color, style.xml style style, etc.
  • androidmanifest.xml configuration file: The control file of the system. Used to tell some of the basic information included with Android apps. For example, the component, the resource, and the required permissions. and compatible with the minimum version number of the SDK, etc.
6. Several frequently used views

Click on the menu bar: Windows--show view to open the corresponding view can be:

Click on other to see some of the frequently used views in Android:

In fact the basic is still the use of logcat. Because unlike Java, our app executes on a virtual machine, and our console does not display relevant information, only the installation state, so we will check the log information of the program execution on Logcat:

7. Summary of this section

In this section we learned to build our Android development environment using Eclipse, both lazy and hands-on versions.
We then introduced some information about the folder structure of the Eclipse development Android project. In the next section we'll dive into Helloworldproject. Learn the code!

Android Basic Beginner Tutorial--1.2.1 using Eclipse + ADT + SDK to develop Android APP

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.