Android开发文档翻译

Get the Android SDK

获取安卓开发工具包

The Android SDK provides you the APIlibraries and developertools necessary to build, test, and debug apps forAndroid.

Android SDK提供了你所需的API库和开发工具构建、测试和调试Android应用程序。

If you're a new Android developer, werecommend you download theBundle to quickly startdeveloping apps. It includes the essential Android SDKcomponents and a versionof the Eclipse IDE with built-in ADT (Android DeveloperTools) to streamlineyour Android app development.

如果你是Android开发的新手,我们推荐ADT包快速开始开发应用程序。它包括必要的Android SDK组件和一个版本的Eclipse  IDE内置ADT(Android开发者工具)来简化你的Android应用程序开发。

With a single download, the ADT Bundleincludes everything youneed to begin developing apps:

下载一个ADT包包含了你开始开发应用程序所需要的所有东西:

Eclipse + ADT plugin

Android SDK Tools

The latest Android platform

The latest Android system image for the emulator

Eclipse + ADT插件

Android SDK工具

Android Platform-tools

最新的Android平台

最新的Android模拟器的系统映象

 

 

 

 

To get the ADT Bundle or stand-alone SDK Tools, please visitthe website at developer.android.com/sdk/

如果你喜欢使用现有版本的Eclipse或另一个IDE,您可以采取更加定制方法安装Android SDK。Android项目包含的所有文件,包括你的Android应用程序的源代码。Android SDK工具可以很容易开始一个新的Android项目使用一组默认项目目录和文件。

An Android projectcontains all the files that comprise thesource code for your Android app. TheAndroid SDK tools make it easy to start anew Android project with a set ofdefault project directories and files.

Thislesson shows how to create a new project either usingEclipse (with the ADTplugin) or using the SDK tools from a command line.

Note: Youshould already have theAndroid SDK installed, and if you're using Eclipse, youshould also have the ADTplugininstalled (version 22.6.2 orhigher). If you don't have these, followthe guide to Installing theAndroid SDK before you start this lesson.

Android项目包含的所有文件,包括你的Android应用程序的源代码。Android SDK工具可以很容易开始一个新的Android项目使用一组默认项目目录和文件。
这节课展示了如何创建一个新项目使用Eclipse(ADT插件)或使用SDK工具从命令行。
注意:您应该已经安装了Android SDK,如果你使用Eclipse,你应该也有ADT plugininstalled(22.6.2或更高版本)。如果你没有这些,遵循指南安装AndroidSDK在你开始这节课。

Createa Project with Eclipse

1.   Click New  inthe toolbar.

在工具包中点击创建一个新的工程

2.   In the window thatappears, open the Android folder,select Android Application Project,and click Next.

在出现的窗口中,打开Android 文件夹,选择Android Application Project,点击下一步

3.   Fill in the formthat appears:

填写出现的表格:

o   Application Name is the app name that appears tousers. For this project, use "My FirstApp."

ApplicationName就是出现在用户面前的应用名称。对于这个工程,使用"My FirstApp."

o   Project Name is the name of your project directory and the namevisible in Eclipse.

Project Name是项目目录的名称,该名称在eclipse中是可见的。

o   Package Name is the package namespace for your app (followingthe same rules as packagesin the Java programming language). Your package namemust be unique across allpackages installed on the Android system. For thisreason, it's generally bestif you use a name that begins with the reversedomain name of your organizationor publisher entity. For this project, you canuse something like"com.example.myfirstapp." However, you cannotpublish your app onGoogle Play using the "com.example" namespace.

Package Name是你应用程序的包名称空间(在java编程语言中遵循同样的规则)。你的包名必须是所有安装在Android系统上的包中唯一的。因为这个原因,一般最好的如果你使用一个名称,开始与您的组织的反向域名或出版商实体。对于这个项目,您可以使用类似于“com.example.myfirstapp。“不过,你不能在谷歌发布你的应用程序使用“com.example”名称空间。

o   Minimum RequiredSDK is the lowest version of Androidthat your app supports,indicated using the APIlevel.To support as many devices as possible, you should set this to thelowestversion available that allows your app to provide its core feature set.If anyfeature of your app is possible only on newer versions of Android andit's notcritical to the app's core feature set, you can enable the feature onlywhenrunning on the versions that support it (as discussed in SupportingDifferentPlatform Versions). Leave this set to the default valuefor this project.

Minimum RequiredSDK是你的Android应用程序所支持的最低版本,表明使用该API级别。为了支持尽可能多的设备,您应该尽可能将其设置为最低版本,允许你的应用程序提供其核心功能。如果你的应用程序的任何特性是可能只在新版本的Android和它不是关键应用程序的核心功能,您可以启用该功能只有在版本上运行,支持支持不同的平台版本(如前所述)。离开这个设置为这个项目的默认值。

o   Target SDK indicates the highest version of Android (alsousing the APIlevel)with which you have tested with your application.

As new versions of Android becomeavailable, you should testyour app on the new version and update this value tomatch the latest API levelin order to take advantage of new platform features.

     Target SDK表明最高版本的Android使用API级别(也)在测试您的应用程序。
随着新版本的Android可用时,你应该在新版本上测试你的应用程序和更新这个值以匹配最新的API级别,以利用新的平台特性。

o   Compile With is the platform version against which you willcompile your app. By default,this is set to the latest version of Androidavailable in your SDK. (It shouldbe Android 4.1 or greater; if you don't havesuch a version available, you mustinstall one using the SDKManager).You can still build your app to support older versions, butsetting the buildtarget to the latest version allows you to enable new featuresand optimizeyour app for a great user experience on the latest devices.

Compile With是将编译你的应用程序的平台版本。默认情况下,默认情况下,这是设置为可用的最新版本的Android SDK。(应该是Android4.1或更高版本,如果你没有这样一个可用的版本,您必须安装一个使用SDK管理器)。你仍然可以构建应用程序来支持旧版本,但设置构建目标到最新版本允许您启用新特性和优化你的应用程序的用户体验最新的设备。

o   Theme specifies the Android UI style to apply for yourapp. You can leave thisalone.

Theme 指定AndroidUI主题风格应用在你的应用程序上,你可以将它单独放置。

Click Next.点击Next

4.   On the next screento configure the project, leave thedefault selections and click Next.

在下一个屏幕上配置项目,保留默认选项并点击Next

5.   The next screen canhelp you create a launcher icon foryour app.

You can customize an icon in several waysand the tool generatesan icon for all screen densities. Before you publishyour app, you should besure your icon meets the specifications defined in the Iconography designguide.

在下一个屏幕上可以帮助你为你的应用创建一个启动器图标。
你可以定制一个图标在几个方面,对所有屏幕密度工具生成一个图标。在你发布你的应用程序之前,你应该确保你的图标符合规范中定义的图解设计指南。

Click Next. 点击Next

6.   Now you can selectan activity template from which tobegin building your app.

For this project, select BlankActivity andclick Next.

现在,您可以选择一个活动开始构建应用程序的模板。对于这个项目,选择BlankActivity并单击Next。

7.   Leave all thedetails for the activity in their defaultstate and click Finish.

Your Androidproject is now a basic "Hello World" appthat contains some defaultfiles. To run the app, continue to the nextlesson.

离开默认状态的活动的所有细节并单击Finish
你的Android项目现在是一个基本的“HelloWorld”应用程序,其中包含一些默认的文件。要运行应用程序,继续下一个教训。

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值