android studio 1.0开发,有感于android studio 1.0出了不久,新手还不会用,特翻译google官方页面帮助新手开发APP

原页面:http://developer.android.com/tools/studio/index.html#project-structure

Android Studio Overview
Android Studio概述

Android Studio is the official IDE for Android application development, based on IntelliJ IDEA. On top of the capabilities you expect 
from IntelliJ, Android Studio offers:

Android Studio是Android应用开发官方的IDE,基于IntelliJ IDEA。超出你的期待,IntelliJ,Android工作室提供:

Flexible Gradle-based build system
Build variants and multiple apk file generation
Code templates to help you build common app features
Rich layout editor with support for drag and drop theme editing
Lint tools to catch performance, usability, version compatibility, and other problems
ProGuard and app-signing capabilities
Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine
And much more

以Gradle为基础灵活的建造系统

构建变体和多重APK文件的生成

代码模板来帮助你建立共同的应用程序的功能

丰富的布局编辑器支持拖放主题编辑

皮棉工具捕捉性能,可用性,版本的兼容性,和其他的问题

混淆器和应用程序签名功能

建立在对谷歌云平台的支持,使其易于集成谷歌云消息和应用引擎

以及更多


If you're new to Android Studio or the IntelliJ IDEA interface, this page provides an introduction to some key Android Studio features.

如果你是 Android Studio或者 IntelliJ IDEA界面新手,这个页面将提供关键的介绍

For specific Android Studio how-to documentation, see the pages in the Workflow section, such as Managing Projects from Android Studio and Building and Running from Android Studio.

Android Studio新建工程的细节文档,参见看工作流页面,比如工程管理、新建工程、运行等。(也就是说想知道怎么新建 工程去查看Workflow section)

Project and File Structure

工程和文件结构


Android Project View

安卓工程视图

By default, Android Studio displays your profile files in the Android project view. This view shows a flattened version of your project's structure that provides quick access to the key source files of Android projects and helps you work with the new Gradle-based build system. The Android project view:

默认情况下,Android的工作室在Android项目视图显示您的配置文件。该视图显示一个扁平的版本的项目的结构,提供了快速访问Android项目的关键源文件和帮助您的新工具建立系统的基础工作。Android项目视图:(good 爱词霸翻译的相当好)

  • Groups the build files for all modules at the top level of the project hierarchy.
  • Shows the most important source directories at the top level of the module hierarchy.
  • Groups all the manifest files for each module.
  • Shows resource files from all Gradle source sets.
  • Groups resource files for different locales, orientations, and screen types in a single group per resource type.
群体构建文件在项目层次结构的顶层模块。

显示在模块层次结构的顶层最重要的源目录。

集成所有的清单文件,每个模块。

显示所有源设置资源文件的工具。

不同地区的资源文件,方向,和每个资源类型的一组屏幕类型。



图解2。工程建设文件。

Android项目视图显示所有生成的文件在Gradle脚本的项目层次结构的顶层。每个项目模块出现在项目层次结构的顶层文件夹中包含这三个要素在顶层:

Java/源文件。

manifests/清单文件。

RES /资源文件。

For example, Android project view groups all the instances of the ic_launcher.png resource for different screen densities under the 

same element.

?不知道什么意思

New Project and Directory Structure
新的项目和目录结构

When you use the Project view of a new project in Android Studio, you should notice that the project structure appears different than 

you may be used to in Eclipse. Each instance of Android Studio contains a project with one or more application modules. Each 

application module folder contains the complete source sets for that module, including src/main and src/androidTest directories, 

resources, build file and the Android manifest. For the most part, you will need to modify the files under each module's src/main 

directory for source code updates, the gradle.build file for build specification and the files under src/androidTest directory for 

test case creation.

当你新建一个工程,并使用Android studio的项目浏览方式,你会发现比在Eclipse中出现的工程结构不同。Android studio的每个实例都包含一个项目

与一个或多个应用模块。每个应用程序模块,模块文件夹包含完整的源集,包括src/main和SRC / androidtest资源目录,build file和the Android 

manifest。最重要的是,你将需要修改的文件,每个模块的src/main源代码更新目录下的文件,为建立gradle.build规范和文件在src / androidtest创

建测试案例的目录。

Figure 3. Android Studio project structure
图解3:android studio工程结构

For more information, see IntelliJ project organization and Managing Projects.
更多信息,参见IntelliJ project organization 和 Managing Projects.

Creating new files
新建文件

You can quickly add new code and resource files by clicking the appropriate directory in the Project pane and pressing ALT + INSERT on Windows and Linux or COMMAND + N on Mac. Based on the type of directory selected, Android Studio offers to create the appropriate file type.

For example, if you select a layout directory, press ALT + INSERT on Windows, and select Layout resource file, a dialog opens so you can name the file (you can exclude the .xml suffix) and choose a root view element. The editor then switches to the layout design editor so you can begin designing your layout.

您可以快速添加新的代码和资源通过点击相应的目录中的项目”窗格中,Windows和Linux中按ALT + INSERT,在MAC中按COMMAND + N。基于目录的类型选择,Android Studio提供了创建适当的文件类型。
例如,如果您选择一个布局的目录,Windows中按下ALT + INSERT,然后选择布局资源文件对话框打开,所以你可以命名文件(可以排除.XML后缀),选择一个根视图元素。编辑切换到布局编辑器,你可以开始设计你的布局。

Android Build System

The Android build system is the toolkit you use to build, test, run and package your apps. This build system replaces the Ant system used with Eclipse ADT. It can run as an integrated tool from the Android Studio menu and independently from the command line. You can use the features of the build system to:

Customize, configure, and extend the build process.
Create multiple APKs for your app with different features using the same project and modules.
Reuse code and resources across source sets.

The flexibility of the Android build system enables you to achieve all of this without modifying your app's core source files. To build an Android Studio project, see Building and Running from Android Studio. To configure custom build settings in an Android Studio project, see Configuring Gradle Builds.

Android构建系统
Android构建系统的工具包你用于构建,测试,运行您的应用程序和软件包。这个构建系统取代使用Eclipse ADT的蚂蚁系统。它可以运行在Android Studio菜单集成工具和独立的命令行。您可以使用的编译系统的特点:
1.定制,配置,和扩展的构建过程。
2.为您的应用程序使用同一项目的不同特点和模块创建多个应用程序。
3.在源代码的复用和资源集。
Android的灵活性,构建系统可以让你实现这一切无需修改应用程序的内核源文件。建立一个Android Studio项目,参见建设和运行Android的工作室。配置自定义生成设置在机器人工作室项目,请参阅配置工具建立。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值