Android Learning Note two

Source: Internet
Author: User

ADT (Android development tools) Android development tool.

Introduction to the Android project directory

==>

Src==> Source code files

res==> resource File

androidmanifest.xml== "Configuration Management file (personal understanding), the Android system project manifest file, which controls the Android app's name, icon, access rights and other overall attributes.

Layout==> Storing UI layout files

Values==> storing resource files in various XML formats

Eg: string resource file--strings.xml;

Color resource file--colors.xml;

Size resource file--dimens.xml;

DRAWABLE-LDPI, drawable-mdpi, and drawable-hdpi are used to store image files from low to high resolution respectively.

Bulid.xml==> It is an ant build file provided by Android for the project. By generating this file, developers can build and install Android projects through Ant.

Attention:

Ant Tools Ant is a Java-based build tool. Theoretically, it is somewhat similar to make in (Unix) C, but without the bug of make. The latest version is: Ant 1.9.4--reference Baidu Encyclopedia. Bin==> This directory is used to store the generated target files, such as Java binaries, resource packaging files (. AP_ suffixes), executable files for Dalvik virtual machines (. Dex suffixes), and so on.     Gen==> This directory is used to save a R.java manifest file that is automatically generated by Android.  The R.java file is automatically generated by the AAPT tool based on the resource files in your app-so you can interpret R.java as a resource dictionary for Android apps.    Note: R.java defines an inner class for each resource, where each resource item corresponds to a field of type int of the inner class.      Usage: java==>eg:r.strings.txtname--references a property value in the Strings.xml file that has the name txtname. Resource File = = "@string/app_name, @+id< identifier code > (android:id=" @+id/txtname ") aapt==>aapt the Android Asset packaging Tool, In the Build-tools directory of the SDK. The tool can be viewed, created, updated in zip format with document attachments (Zip, jar, apk). You can also compile the resource files into binaries, although you may not have used the AAPT tool directly, but the build scripts and IDE plugins Use this tool to package the APK file to form an Android application. Before using AAPT, you need to configure the Sdk-tools path inside the environment variable, or the path +aapt into AAPT.

Androidmanifest.xml

= = "

The androidmanifest.xml manifest file is required for Android projects. It is a global profile of the entire project--used to describe the name of the app, the icons used, the components included, and so on ...

Androidmanifest.xml usually contains the following content:

The package name of the ==> application-the unique identity that the package name uses for the app;

The application contains components--activity, Service, Broadcastreceiver, ContentProvider ...

Application-compatible version information;

The permission declaration required by the application to use the system;

The permission statements required by other applications to access the program;

Note: For the application of the system, you need to set the corresponding system permissions to use it properly. EG: Call system call, text message, contact, photo, Bluetooth, WIFI ....

 

Android Learning Note two

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.