android studio learning ---- directory structure

Project structure: a window of only one item, on behalf of a project called Project workspace

A structural difference with the eclipse of the project is quite large:

First look at the APP structure: app is actually put java files and resource files

 

 Change directory structure

 

 Such as switching to the project interface

 

 

  • 1, Studio Project and Module has the concept, said before Studio in a window can have only one project, namely Project, on behalf of a workspace, but a Project can contain multiple Module, such as your project references the Android Library, Java Library etc., which can be seen as a Module;

  • 2, in the above directory java code and resource files (images, layout files, etc.) attributed to all src, there is a main packet in the src directory and divided into two res java and folders, the folders corresponding to java src file in the Eclipse folder, res directory structure is the same.

  1. android studio project is to develop a single model
  2. android studio in the application corresponds to the eclipse of the workspace concept
  3. android studio in the module corresponds to the eclipse of the project concept

After the new construction project of AS Product directory structure is as follows:

  .idea://AS生成的工程配置文件,类似Eclipse的project.properties。
    app://AS创建工程中的一个Module。
    gradle://构建工具系统的jar和wrapper等,jar告诉了AS如何与系统安装的gradle构建联系。
    External Libraries://不是一个文件夹,只是依赖lib文件,如SDK等。

新建工程项目后AS的Module目录结构如下所示:

 build://构建目录,相当于Eclipse中默认Java工程的bin目录,鼠标放在上面右键Show in Exploer即可打开文件夹,
        编译生成的apk也在这个目录的outs子目录,不过在AS的工程里是默认不显示out目录的,就算有编译结果也
        不显示,右键打开通过文件夹直接可以看。
    libs://依赖包,包含jar包和jni等包。
    src://源码,相当于eclipse的工程。
    main://主文件夹 
        java://Java代码,包含工程和新建是默认产生的Test工程源码。 
        res://资源文件,类似Eclipse。
            layout://App布局及界面元素配置,雷同Eclipse。
            menu://App菜单配置,雷同Eclipse。 
            values://雷同Eclipse。
                dimens.xml://定义css的配置文件。 
                strings.xml://定义字符串的配置文件。 
                styles.xml://定义style的配置文件。
                ......://arrays等其他文件。
            ......://assets等目录
        AndroidManifest.xml://App基本信息(Android管理文件) 
        ic_launcher-web.png://App图标 
    build.gradle://Module的Gradle构建脚本

原文:https://www.cnblogs.com/wust221/p/5426902.html

Guess you like

Origin www.cnblogs.com/qiantao/p/12034684.html