I don't know if this is because of the Gradle Build System (I'd wager it is), but I'll tell you what I've understood so far. Update 1: 29/7/13 The IntelliJ's Project structure (shown at the end) is for IntelliJ with the android plugin. The Android Studio, however, has a project structure divided like so:

Update 2: 07/04/14

Structure: Projects and Modules

module in Android Studio is like a project in Eclipse

project in Android Studio is like a workspace in Eclipse

From the documentation (Android Studio is based on Intellij IDEA) :

Whatever you do in IntelliJ IDEA, you do that in the context of a project. A project is an organizational unit that represents a complete software solution.

Your finished product may be decomposed into a series of discrete, isolated modules, but it's a project definition that brings them together and ties them into a greater whole.

For Android, it means one project per app, and one module per library and per test app.

There are multiple issues if you try to build multiple apps within the same project. It's possible, but if you try (like I did), you will see that almost everything is designed to work with a single app per project.

For example, there is an option to "rebuild the project", which makes no sense with multiple apps, many other project settings would be useless, and the built-in VCS system isn't great when you have multiple repositories.

Structure: Folder Structure

Top Level Folders

1. Main Project

This would be entire project context (Eclipse Land: Like your workspace but limited to what's relevant to your project). Ex: HelloWorldProject if the name of the application you gave was HelloWorld

2. .idea

This where project specific metadata is stored by Android Studio (AS). (Eclipse Land: project.properties file)

3. Project Module

This is the actual project. ex: HelloWorld if your application name you gave was HelloWorld

4. gradle

This is where the gradle build system's jar wrapper i.e. this jar is how AS communicates with gradle installed in Windows (the OS in my case).

5. External Libraries

This is not actually a folder but a place where Referenced Libraries (Eclipse Land: Referenced Libraries) are shown. Here's where the Targeted Platform is shown etc.

[Side note: This where many of us in Eclipse Land used to delete the referenced libraries and Fix Project Properties to fix reference errors, remember?]

Project Folder in Detail

This is number #3 in the above list. Has the following sub dirs

1. build

This has all the complete output of the make process i.e. classes.dex, compiled classes and resources, etc.

In the Android Studio GUI, only a few folders are shown. The important part is that your R.java is found here under build/source//r///R.java

2. libs

This is the standard libs folder that you see in eclipse land too

3. src

Here, you only see the java and res folder which correspond to the src folder and res folder inEclipse Land. This is much welcomed simplification IMHO.

Note on Modules:

Modules are like Eclipse Land projects. Here the idea is that you have one application project (Module #3 in the list above) and several library projects(as separate Modules under the global project folder (#1 in the above list)) which the application project depends on. How these library projects can be re-used in other applications, I still haven't found out.

[Side note: The whole re-organization has some benefits like simplifications in src folder, but so many complications. The complications are mainly due VERY VERY thin documentation on this new project layout.]

The New Build System

User Guide for the new Build System

I'll probably update this section once I myself get it.

Compare this with Intellij's Project Structure if that helps:

The .idea (1) folder contains a number of subfolders, mainly with internal IntelliJ IDEA information.

The src (2) folder contains the MyActivity.java (3) file source code that implements the functionality of your application. The file belongs to the com.example package.

The res (4) folder contains various visual resources.

The layout/main.xml file (5) defines the appearance of the application constituted of resources of various types.

The values folder (6) is intended for storing .xml files that describe resources of various types. Presently, the folder contains a strings.xml file with String resources definitions. As you will see from the Adding a Color section, the layout folder can also contain, for example, a descriptor of colors.

The drawable folder (7) contains images.

The gen (8) folder contains the R.java (9) file that links the visual resources and the Java source code. As you will see from the sections below, IntelliJ IDEA supports tight integration between static resources and R.java. As soon as any resources are added or removed, the corresponding classes and class fields in R.java are automatically generated or removed accordingly. The R.java file also belongs to the com.example package.

Android Studio 项目目录结构 英文版的更多相关文章

  1. 【Android Studio安装部署系列】三、Android Studio项目目录结构

    版权声明:本文为HaiyuKing原创文章,转载请注明出处! 概述 简单介绍下Android studio新建项目的目录结构. 常用项目结构类型 在Android Studio中,提供了以下几种项目结 ...

  2. Android开发学习之路--Android Studio项目目录结构简介

    既然已经搭建好环境了,那就对Android Studio中项目目录结构做个简单的了解了,这里以最简单的Hello工程为例子,新建好工程后看如下三个工程视图: 1.Android工程 manifests ...

  3. Android Studio项目目录结构介绍——android菜鸟成长之路

    在Android Studio中,提供了以下几种项目结构类型 我们一般常用的有以下两种结构: Project 结构类型 app/build/ app模块build编译输出的目录 app/build.g ...

  4. Android Studio项目目录结构介绍

    在Android Studio中,提供了以下几种项目结构类型 我们一般常用的有以下两种结构: Project 结构类型 app/build/ app模块build编译输出的目录 app/build.g ...

  5. Android Studio项目目录结构

    在Android Studio中,提供了以下几种项目结构类型 我们一般常用的有以下两种结构: Project 结构类型 app/build/ app模块build编译输出的目录 app/build.g ...

  6. 揭秘Android Studio项目目录结构

    I don't know if this is because of the Gradle Build System (I'd wager it is), but I'll tell you what ...

  7. android studio学习----目录结构

    项目结构:一个窗口只有一个项目,项目 叫  Project 代表一个workspace 一个项目的结构跟eclipse区别还是蛮大的: 首先看APP结构:app放的其实就是  java文件和资源文件 ...

  8. Android Studio工程目录介绍

    来自知乎: Android Studio工程目录结构 .gradle 是gradle运行以后生成的缓存文件夹. .idea 是android studio/Intellij IDEA工程打开以后生成的 ...

  9. Android Studio项目结构

    我们创建了一个Android Project,打开就如下图所示:  我们选择Project视图,就会有以下的项目文档结构:  上面笔者标注的数字是接下来要讲解的内容. 我们先来看1: 我们创建Appl ...

随机推荐

  1. exchange邮箱的”单点登陆“

    在跟exchange集成登陆时,通常有这样的需求,用户需要点击邮件链接的时候直接打开,不再需要输入用户名密码,实现所谓的单点登陆. 通常有两种方式 1.form认证 登陆原理:用js模拟表单登陆 代码 ...

  2. trangleProble switch方法 java

    public class trangleProblem { static int res=1; int codePart=1; int n=100; Stack<Param> stack= ...

  3. 【转】关于ios10中ATS的问题

    原文连接:https://onevcat.com/2016/06/ios-10-ats/ WWDC 15 提出的 ATS (App Transport Security) 是 Apple 在推进网络通 ...

  4. BestCoder 2nd Anniversary 1001 Oracle

    找到最小的非零数字拆开来相加. 高精度. #include <iostream> #include <cstdio> #include <cstring> #inc ...

  5. css多行文本居中

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  6. Chapter 02:复合 VS 继承

    复合优先于继承,继承是实现代码重用的有力手段,并不是所有情况都适用,使用不当会导致软件变得很脆弱.与方法调用不同的是,继承打破了封装性. 总而言之,组合和继承,都能实现对类的扩展.但是要分具体情况用哪 ...

  7. Boost程序库完全开发指南——深入C++“准”标准库(第3版)

    内容简介  · · · · · · Boost 是一个功能强大.构造精巧.跨平台.开源并且完全免费的C++程序库,有着“C++‘准’标准库”的美誉. Boost 由C++标准委员会部分成员所设立的Bo ...

  8. 任何时候都适用的20个C++技巧

    这些小技巧之所以特别,是因为这些信息通常吧不能在C++书籍或者网站上找到.比如说,成员指针,即使对于高级程序员也是比较棘手,和易于产生bugs的,是应该尽量避免的问题之一. <翻 by凌云健笔& ...

  9. (续)顺序表之单循环链表(C语言实现)

    单循环链表和单链表的唯一区别在于单循环链表的最后一个节点的指针域指向第一个节点, 使得整个链表形成一个环. C实现代码如下: #include<stdio.h> typedef struc ...

  10. adobe reader安装完成之前被中断,错误代码150210解决方法

    adobe reader安装完成之前被中断,错误代码150210解决方法出现这种情况是因为之前安装过adobe reader但是没有卸载删除干净进而导致重新安装时无法安装.为什么卸载不了大多数是因为3 ...