Androidstudio folder Structure View explained

Source: Internet
Author: User

recently, Google is already planning to scrap eclipse. and to support his biological son Androidstudio, has not been in the maintenance of eclipse, that is, what is wrong with Eclipse. Google is no longer in the pipeline, but Google to maintain the previous eclipse of the hardcore fans, Since the Studio1.2 version number supports the direct use of our Eclipse project directly into studio, without the need to export from eclipse, this is the trouble that studio will be able to convert eclipse into what studio knows, and how to turn it We don't need to know. I've been using studio for more than three months now. This period has been witnessed from 1.0 to today's 1.3, it is true that studio is more powerful than eclipse, easy to use. Smooth, use up there is so a trace of the intimacy of silk, but suppose there is any problem solved is more than eclipse egg pain ah.

It took so long. Today I decided to write about the powerful and complex folder structure of studio, and there are some things that are reproduced by others.
As a co-owned three kinds of views, the following we look at each.


One, Project view (White font folder/file is not interested)
Reproduced

Two packages views

The biggest difference between the view and project is that it hides the configuration file, the properties file, and the system's own folder.
Only shows the current module list and module below the folder, file.

Three Android views

The Andrid view is a new version of as a newly launched view. A lot of people are coming from the development of ecplise, accustomed to the project view.
Use the Android view. Found that there is really a lot of advantages to it.

Because most of the folders, the files are labeled specifically in the first view. This is not the one by one mark.
Can see in the Android view of the first level folder in two areas, one is the module list area, one is the Gradle script area

The Module folder is divided into three sub-folders, respectively, corresponding mainfests files, Java source code, RES Resource folder.
In the diagram, there are multiple folders and file names that are the same. But there is an identity behind it. For example, there are two diesns.xml files, one behind (W820DP).

It means that the Dimens value under this file will be referenced when the available width of the phone is at least 820DP.
We are more concerned about how this kind of file is built. As a matter of fact, the entire view of project is a real folder. And in
Android view, very large folders are not present, is by the Android view of their own initiative to merge together, convenient for us to understand and decorate.

Switch to Project view, which is a dimens file under that folder

The Android view itself merges them together, indicating that these files work the same way, only to refer to files under different folders because of different devices.

There are multiple Gradle files and properties files under the Gradle script folder.
Look at the following tips, from top to bottom: Project space for the Gradle profile, the first module, and the second module configuration file.
Gralde the properties file, the settings file, and the local SDK path properties file.
These files have been specifically described in project. There is no explanation here.

Three kinds of views, which one do you like?

The biggest advantage of Android view is to get rid of some files and folders that we don't care about. (Configuration, properties files, etc.) and some resource files, the source files are very clearly merged together. Hiding some of the files and folders that are actively generated by themselves (such as r files, etc.) can allow us to manage the whole project/module more methods.

Recommended articles

    1. Gradle Introduction http://stormzhang.com/devtools/2014/12/18/android-studio-tutorial4/
    2. about GitHub http://www.worldhello.net/gotgithub/

Androidstudio folder Structure View explained

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.