International Practice First Android program

Source: Internet
Author: User

The development tools I use here are ADT Bundles (adt-bundle-windows-x86_64-20140702), which include Eclipse, ADT plug-ins, and SDK tools, which are already integrated Ides , just install the JDK to start development, recommend the beginner to download ADT Bundle, no need to toss the development environment.

First create an AVD

Then create a HelloWorld project, select the SDK version

Set activity name to Helloworldactivity,layout name to Hello_world_layout

Click Finish, below to see our project structure.

You must feel dizzy to see so many strange things.

The following one by one explains.

1. SRC
There is no doubt that the SRC directory is where all of our Java code is placed, and its meaning here is exactly the same as the SRC directory under the normal Java
project, and you will see the helloworldactivity we just created
The file is inside.
2. Gen
The contents of this directory are automatically generated, there is a main R.java file, you add in the project any
any resources will generate a corresponding resource ID in it. This file should never be manually modified.
3. Assets
This directory is not used much, it can mainly store some files packaged with the program, you can
dynamically read the contents of these files while your program is running. In addition, if your program uses the WebView load local page
function, all the Web page related files are also stored in this directory.
4. Bin
This directory you do not need to pay much attention to, it mainly contains some of the files generated automatically at compile time. Where
will have a setup package that you have compiled for your current project, expand the Bin directory and you will see helloworld.apk, and copy this
file to your phone to install it directly.
5. Libs
If you use a third-party jar package in your project, you will need to put the jar packages in the Libs directory, and the jar packages in this directory will be automatically added to the build path. You can expand in Android 4.0,

Android Private Libraries, Android Dependencies these libraries, which show the Jar packages are already
Added to the build path.
6. Res
The contents of this directory is a bit more, simply say, you use in the project all the pictures, cloth
The resources of the Bureau, string, etc. are to be stored in this directory, the above mentioned R.java content is also according to this goal
Recorded files are automatically generated. Of course, there are many subdirectories under this directory, and the images are placed in the drawable directory.
Layouts are placed in the layout directory, strings are placed in the values directory, so you don't have to worry about putting the entire res directory
Make a mess.
7. Androidmanifest.xml
This is the configuration file for your entire Android project, and all four components you define in the program need to be in this
Files are registered in a file. You can also add a permission statement to the application in this file, or you can reassign your
The minimum and target version of the program specified when the project was created. Since this file is often used later, we
When you use it, do a detailed explanation.
8. Project.Properties
This is a very simple file that specifies the version of the SDK that is used to compile the program through a single line of code.
Our HelloWorld Project uses API 14, and you can change it here to another version and try it.
So the entire project directory structure will be introduced, if you do not fully understand the words are normal, after all,
There are too many things you haven't touched. Don't worry, this will not affect the learning behind you.

International Practice First Android program

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.