#android Learning Day 2 #Android The directory structure of the studio project

Source: Internet
Author: User

Create a blank project MyApplication, the project directory is as follows:

1). Idea

. idea is a number of XML configuration files, including copyrights. This section is limited in knowledge and will be supplemented by subsequent understandings.

2) App

App to MyApplication is equivalent to project's workspace for Eclipse, which belongs to module in Android Studio. There are two folders in the SRC directory: androidtest and Main.

Androidtest for testing.

The main folder contains Java files and resource files.

Where the Res folder is below:

The layout folder is the layouts file, we can write the layout Edge preview effect, this kind of real-time rendering function is more than eclipse development of a more friendly aspect, while he can also preview different resolution devices, different resolution of the effect is unobstructed.

The Strings.xml file under the Values folder is a string file.

A very central point in the AndroidManifest.xml:Android application architecture is that mainactivity does not need to know the existence of subactivity, that is, it does not directly own the Subactivity interface, But it can be a string to tell the application framework layer, the name of the activity it is to start, other things to the application framework layer to do, the program framework can be based on the name to find the corresponding activity, it is necessary to match the application itself, This is done through the application's configuration file, Androidmanifest.xml.

In this file, Mainactivity is configured as the default activity for the application, which means that when the user clicks on the Activity app icon on the phone screen, launcher will start the activity by default Mainactivity This configuration file also associates the name "#.#.activity.subactivity" with the subactivity, so the application framework layer can find it by name

We note that there is a file called Build.gradle in this directory, which is what Android Studio uses to manage the module. Right-click the app, select Open Module Settings, and any settings on module will be written to Build.gradle

3) Build

4) Gradle

#android Learning Day 2 #Android The directory structure of the studio project

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.