Android Project directory Introduction II

Source: Internet
Author: User

Devices: displays devices connected to the Android development environment, including simulators and phones.

Android error messages and debug information are printed in logcat

      android All resource files will be in r.java id r The file manages resource files in the form of static internal classes, a type of resource file, in the r corresponds to an inner class in the file. r.java The content is automatically generated by the system, Can not be changed manually. The r files are all maintained in integer variables.

In Android , the file name cannot begin with a number.

All resource files on Android cannot be named in Chinese.

Different images are required for different screen resolutions. The picture is placed under different drawable for the screen to fit.
src: store all Java code in an Android project

Gen:

Buildconfig: Whether the application can be debugged

R: Save the ID of the resource used in bold . The resource ID is automatically generated by the system and cannot be changed manually.

Libs: In Android , all third-party jar packages are placed in the Libs Folder below.
The Android APIcan only be used if the Android.jar package is imported.
Assets
: Resources folder, storage of video or music and other large resource files
bin: Store application packaged and compiled files
Res: resource folder, all resources in this file, there will be resource ID, read through the resource ID can be read. The resource ID cannot appear in Chinese.
Layout : Layouts folder, the layout file is saved, all the layout files in Android are xml files. Layout files are used to set the screen layout.
Menus: Menu configuration file, which is used to configure the menu. Determines the style and functionality of the menu.

Values :
Strings.xml: A string string resource used in a project to define strings Resources.
used when using the string resource name as ID. Not specified
The Stringname string cannot be used. Convenient internationalization.
How to use @string/name name

styles.xml A resource file that defines styles and themes.

dimens.xml The resource file used to define the dimensions. Easy to do screen adaptation.

the recommended size unit for Android is DP. Pixels are displayed the same on any screen.

DP is related to screen density (resolution)

       The package name of the Android app and the package name of the deployment can be different. The package that the application deploys in Android         ( Package = " Com.test.helloWord " ).

android:versionname= version number of the"1.0"Android app
Android:versioncode
="1" Version number of the Android program code
android:minsdkversion = minimum supported system version

android:targetsdkversion
="+" SDK version
Android:theme
="@style/apptheme" Set theme
android:icon= icon for "@drawable/ic_launcher" application

Android:label
= name of "@string/app_name" application

Configure the application's portal any application cannot start if it does not have a program entry.

<intent-filter>

  &NBSP, < action &NBSP; android:name = " Android.intent.action.MAIN " &NBSP; />

< category android:name="Android.intent.category.LAUNCHER" />

</ Intent-filter >

in the project.properties in target=android-18, The SDK that determines the compilation of Android programs version.

Android Project directory Introduction II

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.