Android project structure in eclipse

Source: Internet
Author: User

Android projects are the projects that eventually get built into. APKFile that you install onto a device. they contain things such as application source code and resource files. some are generated for you by default, while others shoshould be created if required. the following directories and files comprise an android project:

Src/
Contains your stub activity file, which is stored SRC/Your/package/namespace/activityname. Java. All other source code files (such . JavaOr . AidlFiles) Go here as well.
Bin
Output directory of the build. This is where you can find the final . APKFile and other compiled resources.
JNI
Contains native code sources developed using the android ndk. For more information, see the android ndk documentation.
GEN/
Contains the java files generated by ADT, such as your R. JavaFile and interfaces created from aidl files.
Assets/
This is empty. You can use it to store raw asset files. files that you save here are compiled into . APKFile as-is, and the original filename is preserved. You can navigate this directory in the same way as a typical File System Using Uris and read files as a stream of bytes using Assetmanager. For example, this is a good location for textures and game data.
Res/
Contains application resources, such as drawable files, layout files, and string values. See application resourcesfor more information.
Anim/
For XML files that are compiled into animation objects. See the animation resource type.
Color/
For XML files that describe colors. See the color values resource type.
Drawable/
For bitmap files (PNG, JPEG, or GIF), 9-patch image files, and XML files that describe drawable shapes or a drawable objects that contain multiple States (normal, pressed, or focused ). see the drawable resource type.
Layout/
XML files that are compiled into screen layouts (or part of a screen). See the layout resource type.
Menu/
For XML files that define Application menus. See the menus resource type.
Raw/
For arbitrary raw asset files. Saving asset files here instead of in Assets/Directory only differs in the way that you access them. These files are processed by aapt and must be referenced from the application using a resource identifier in RClass. For example, this is a good place for media, such as MP3 or Ogg files.
Values/
For XML files that are compiled into your kinds of resource. Unlike other resources in Res/Directory, resources written to XML files in this folder are not referenced by the file name. Instead, the XML Element type controls how the resources is defined within them are placed into RClass.
XML/
For miscellaneous XML files that configure application components. For example, an XML file that defines Preferencescreen, Appwidgetproviderinfo, Or searchability metadata. See application resources for more information about processing ing these application components.
Libs/
Contains private libraries.
Androidmanifest. xml
The control file that describes the nature of the application and each of its components. for instance, it describes: certain qualities about the activities, services, intent receivers, and content providers; what permissions are requested; what external libraries are needed; what device features are required, what API levels are supported or required; and others. see the androidmanifest. XML documentation for more information
The Manifest File Describes the fundamental characteristics of the app and defines each of its components. You'll learn about various declarations in this file as you read more training classes.

One of the most important elements your manifest shocould include is<Uses-SDK>Element. This declares your app's compatibility with different Android versions usingAndroid: minsdkversionAndAndroid: targetsdkversionAttributes. For your first app, it shoshould look like this:

<ManifestXmlns: Android=Http://schemas.android.com/apk/res/android"...><Uses-SDKAndroid: minsdkversion="8"Android: targetsdkversion="17"/>...</Manifest>

You shoshould always setAndroid: targetsdkversionAs high as possible and test your app on the corresponding platform version. For more information, read supporting different platform versions.

Project. Properties
This file contains project settings, such as the build target. this file is integral to the project, so maintain it in a source revision control system. to edit project properties in eclipse, right-click the project folder and select Properties.
Local. Properties
Customizable computer-specific properties for the build system. if you use ant to build the project, this contains the path to the SDK installation. because the content of the file is specific to the local installation of the SDK, Local. PropertiesShocould not be maintained in a source revision control system. If you use eclipse, this file is not used.
Ant. Properties
Customizable properties for the build system. you can edit this file to override default build settings used by ANT and also provide the location of your keystore and key alias so that the build tools can sign your application when building in release mode. this file is integral to the project, so maintain it in a source revision control system. if you use eclipse, this file is not used.
Build. xml
The ant build file for your project. This is only applicable for projects that you build with ant.
Related Article

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.