基于android的图片浏览器外文翻译.doc

上传人:数据九部 文档编号:10364757 上传时间:2021-05-12 格式:DOC 页数:10 大小:115KB
返回 下载 相关 举报
基于android的图片浏览器外文翻译.doc_第1页
第1页 / 共10页
基于android的图片浏览器外文翻译.doc_第2页
第2页 / 共10页
基于android的图片浏览器外文翻译.doc_第3页
第3页 / 共10页
基于android的图片浏览器外文翻译.doc_第4页
第4页 / 共10页
基于android的图片浏览器外文翻译.doc_第5页
第5页 / 共10页
点击查看更多>>
资源描述

《基于android的图片浏览器外文翻译.doc》由会员分享,可在线阅读,更多相关《基于android的图片浏览器外文翻译.doc(10页珍藏版)》请在三一文库上搜索。

1、毕业设计(论文)外文翻译 院(系) 计算机科学与工程学院 专 业 计算机科学与技术 班 级 070610班 姓 名 曾 文 娟 学 号 070610331 导 师 潘 煜 2011年 5 月 8 日Android introduction and development environment constructionThis barrier to application development began to crumble in November of 2007 when Google, under the Open Handset Alliance, released Android.

2、 The Open Handset Alliance is a group of hardware and software developers, including Google, NTT DoCoMo,Sprint Nextel, and HTC, whose goal is to create a more open cell phone environment.The first product to be released under the alliance is the mobile device operating system, Android.Android, as a

3、system, is a Java-based operating system that runs on the Linux 2.6 kernel.The system is very lightweight and full featured.Android applications are developed using Java and can be ported rather easily to the new platform.One of the more exciting and compelling features of Android is that, because o

4、f its architecture, third-party applicationsincluding those that are “home grown”are executed with the same system priority as those that are bundled with the core system.This is a major departure from most systems, which give embedded system apps a greater execution priority than the thread priorit

5、y available to apps created by third-party developers. Also, each application is executed within its own thread using a very lightweight virtual machine.Aside from the very generous SDK and the well-formed libraries that are available to us to develop with, the most exciting feature for Android deve

6、lopers is that we now have access to anything the operating system has access to. In other words, if you want to create an application that dials the phone, you have access to the phones dialer; if you want to create an application that utilizes the phones internal GPS (if equipped), you have access

7、 to it. The potential for developers to create dynamic and intriguing applications is now wide open.On top of all the features that are available from the Android side of the equation,Google has thrown in some very tantalizing features of its own. Developers of Android applications will be able to t

8、ie their applications into existing Google offerings such as Google Maps and the omnipresent Google Search. Suppose you want to write an application that pulls up a Google map of where an incoming call is emanating from,or you want to be able to store common search results with your contacts; the do

9、ors of possibility have been flung wide open with Android.Now begins your journey to Android development.1、Downloading and Installing Eclipse(1) Selecting a development environment In keeping with the Open Handset Alliances theme of truly opening the mobile development market, Eclipse is one of the

10、most fully featured, free, Java IDEs available. Eclipse is also very easy to use, with a minimal learning curve. This makes Eclipse a very attractive IDE for solid, open Java development.(2) Downloading EclipseNavigate to the Eclipse Downloads page at www.eclipse.org/downloads.Download the Eclipse I

11、DE for Java Developers from this site. The package is relatively small (79MB) and should download fairly quickly.(3) Installing and configuring EclipseExpand the package and run the eclipse.exe file. Eclipse installs to your User directory by default (under Microsoft Windows).Once the Eclipse instal

12、lation commences, you will be prompted to create a default workspace, or folder. Just as in most development environments, projects are created in, and saved to, a workspace. The default path for the workspace is your User directory. To select a different location, click Browse and navigate to it.Af

13、ter you select a location for your workspace, click OK.At this point, your development environment is downloaded and installed. While the installation of Eclipse seemed deceivingly quick, you still need to do some configuration work before you can create your first Android project. Much of the confi

14、guration work that you need to do centers on the Android SDK and the Android plugin for Eclipse.2、Downloading and Installing the Android SDK(1) Downloading the Android SDKThe Android SDK is easily accessible from the http:/ page.From the development home page, click the Download the SDK link under G

15、etting Started. After you agree to the terms of the Android SDK License Agreement, you will see the Download the Android SDK page. The Android SDK is downloaded in a 79MB(for Windows) package and it should download fairly quickly. Click the package name for your operating system to begin the downloa

16、d.There is no “setup” or installation process to speak of for the Android SDK; rather,you must follow a series of steps to associate the SDK with your Eclipse development environment. The first of these steps is to obtain the Android plugin for Eclipse, after which you will configure it.(2) Using th

17、e Update feature of Eclipse(3) Downloading, installing, and configuring the Android plugin for Eclipse Installing:1) Open the Eclipse application. You will download the Android plugin for Eclipse from within the Eclipse IDE.2)Choose Help | Software Updates | Find and Install.3)In the Install/Update

18、window, which allows you to begin the process of downloading and installing any of the plugins that are available to you for Eclipse, click the Search for New Features to Install radio button and then click Next.4) The Update Sites to Visit page of the Install window, shown next, lists all the defau

19、lt websites used for obtaining Eclipse plugins. However, the plugin you want, Android for Eclipse, is not available from the default sites. To download the Android plugin,you must tell Eclipse where to look for it, so click the New Remote Site button.5)In the New Update Site dialog box, shown next,

20、you must enter two pieces ofinformation to continue: a name for your new site, and its associated URL. Thename is only for display purposes and does not affect the downloading of the plugin.In the Name field, enter Android Plugin. In the URL field, enter the URL from which Eclipse will obtain inform

21、ation about the plugins that are available:https:/dl- Click OK.Configuring:1) From the main Eclipse window, choose Window | Preferences.2)In the Preferences window, shown next, select Android in the menu on the left. On the right side of the window, click Browse, find the location of the Android SDK

22、 on your hard drive, and enter it in the SDK Location field. Eclipse needs this information to be able to access all the tools that are supplied with Android, such as the emulator.(4) Checking the PATH statementThe final step in setting up the Android SDK is to put it into your PATH statement. If yo

23、u are using a Microsoft Windows machine, right-click Computer (or My Computer,depending on your version of Windows) and select Properties to open the SystemProperties dialog box. Click the Advanced tab.Click Environment Variables to display the window of the same name, shown in the following illustr

24、ation. This is where you can edit your PATH statement.Under System Variables, find the variable PATH and double-click it.In the Edit System Variable dialog box, shown next, add the location of your Android SDKseparated from the existing paths by a semicolonand click OK to apply your changes, and cli

25、ck OK again in the Environment Variables window.3、Exploring the Android SDK(1) Using the Android SDK documentationThe Android documentation is located in the Docs folder within the Android SDK at./%sdk folder%/DOCS. The documentation that is supplied with the SDK includes steps on downloading and in

26、stalling the SDK, “Getting Started” quick steps for developing applications, and package definitions. The documentation is in HTML format and can be accessed though the documentation.html file in the root of the SDK folder.You can navigate to all of the documentation that is included in the Android

27、SDK by using the links within documentation.html.(2) Using the Android SDK tools(3) Using the sample applicationsUsing Eclipse, load the API Demos application as a New Android Project. To do this,select File | New | Project from the Eclipse menu bar; a New Android Project wizard opens. Do not worry

28、about the options in this wizard for now. Simply select Create Project From Existing Source and browse to the folder with the API Demo application in it. When the project is loaded, choose Run to see it execute in the Android Emulator.(4) Learning the life cycle of an Android applicationThe Android

29、application life cycle is unique in that the system controls much of the life cycle of the application. All Android applications, or Activities, are run within their own process. All of the running processes are watched by Android and, depending on how the activity is running (this is, a foreground

30、activity, background activity, and so forth),Android may choose to end the activity to reclaim needed resources.Android简介和开发环境的搭建在2007年11月,当Google,在开放手机联盟下,发布Android,这个对于应用程序开发者的障开始消失。开放手机联盟是一个硬件和软件开发者组织,它包括Google、NTT DoCoMo,Sprint Nextel,和HTC,它的目标是创建一个更开放的手机环境。在开放手机联盟组织下发布的第一个产品是Android-移动设备操作系统。An

31、droid作为一个系统,是一个运行在Linux2.6内核上的基于Java的操作系统.这个系统非常轻量级的,并且功能丰富.Android应用程序是用Java开发的,能够十分简单的装入新的平台。Android一个最令人兴奋和注目的特色是它的架构,三部分运用程序-包括“home-grown”当这些和内核系统绑定,可带有同样的系统优先权执行。这是和大多系统一个主要的违背,它给了嵌入式系统应用程序一个比进程优先级(从第三方开发者创建的应用程序获得)更大的执行权。每一个应用程序在它自己的进程里使用一个很轻量级的虚拟机执行。除了我们能够获得用来开发的很大量的SDK和良好的架构库,对于Android开发者最令

32、人兴奋的特色是我们现在允许进入任何操作系统所允许的。换句话说,如果你要创建一个拨电话的应用程序,你可接近电话拨号程序,如果你想创建一个利用电话的内在GPS的应用程序(如果配备),你可以接近它。对于开发者创建动态的和令人感兴趣的应用程序的可能性现在是宽阔开放了。在这些特色中最顶级的是从Android网站可获得的平衡,Google已经投放一些它自己非常逗弄的特色。Android应用程序开发者将能够去把自己的应用程序连接到Google提供的已经存在的程序(例如GoogleMaps、不所不在的Google搜索)上。假设你想写一个获取一个打进电话的发出地的Google地图,或者你想能够存储你联系的一般搜

33、索结果;利用Android可能性的大门已经成为直冲的开放和宽阔。现在将开始你的Android开发之旅。一、下载和安装 Eclipse(1) 选择一个开发环境 为了符合开放手机联盟真正开发手机开放市场的主题,Eclipse是一个最完全该特色、自由、可获得的Java IDEs中的一个。Eclipse也使用非常简单,最小的学习弯路。这使得Eclipse成为一个非常吸引人的坚固的开源Java开发IDE。(2) 下载 Eclipse 导航进入下载页面:www.eclipse.org/downloads。从此网站下载Java开发者专用的Eclipse IDE。安装包十分小(79M),并且下载也会相当快。(

34、3) 安装和配置 Eclipse 解压安装包,运行eclipse.exe.在windows下,Eclipse默认安装到你用户目录下。一旦Eclipse 安装开始,你会被催促去创建一个默认的工作空间,或是文件夹。正如多数的开发环境,工程在工作空间里创建和保存。默认的工作空间路径是你的用户目录。要选择不同的路径,点击Browse,并且导航进入来设置它。在你选择了你工作空间路径后,点击OK。 到这,你的开发环境被下载和安装好了。而Eclipse的安装看上去快得出奇,但在你能创建你的第一个Android工程前,你仍然需要去做一些配置工作。许多需要你去完成的配置工作重点是在Android SDK和And

35、roid Eclipse 插件上。2、 下载和安装 Android SDK(1) 下载 Android SDKAndroid SDK很容易从http:/ 页面得到。从开发主页,点击“Getting Start”下面的SDK下载链接。在你同意Android许可协议条款后,你将看到Android SDK下载页面。Android SDK是一个79M的下载包(对于Windows)并且下载会相当快。点击对应你操作系统的包开始下载。对于Android SDK,没有“setup”或是安装步骤涉及到。相反,你必须遵照一系列的步骤来把SDK和你的Eclipse 开发环境结合起来。这些步骤的第一步是获得Andro

36、id Eclipse插件,这之后你要配置它。(2) 使用 Eclipse 更新特性(3) 下载、安装和配置android Eclipse 插件安装:1)打开Eclipse应用程序。你将在Eclipse里面下载Android Eclipse 插件。2)选择Help|Software Updates|Find and Install。3)在Install/Update 窗口中,它允许你开始下载和安装任何一个对于你的Eclipse可以获得的插件的步骤,点击“Search for New Features to Install”点选按钮,接着点击Next。4)安装窗口中的“Update Sites t

37、o View”页面,在下面显示,列出了所有已经得到的Eclipse插件的默认网址。然而,你想要的Android Eclipse插件,在默认网址里没有。为了下载Android 插件,你必须告诉Eclipse 在哪里可以找到它,因此,点击“New Remote Sites”按钮5)在New Update Site对话框中,下面显示的,你必须键入两个信息来继续:新站点的名称和可用的URL链接。名称只是为了显示用的,对下载的插件没有影响。在名称域中,填入Android Plugin,URL域中键入Eclipse能够从该URL获得可用插件信息的URL:http:/dl- 从Eclipse主窗口选择Win

38、dow|Preference 。2) 在“Preferences”(偏好)窗口中,如下所示,在左边菜单中选择Android。在窗口右边,点击Browse,找到你硬盘中Android SDK的位置,并把它选入到SDK Location 域中。Eclipse需要这个信息才能够使用所有Android支持的工具,例如模拟器。(4) 检查PATH 变量 安装Android SDK最后一步是把它设入你的PATH变量中。右击“电脑”(或“我的电脑”,依赖于你的Windows版本),并选择“属性”来打开系统属性对话框。点击“高级”标签。点击环境变量来显示同名的变量窗口。这是你能够编辑PATH变量的地方。在系统

39、变量中,找到PATH变量并双击它。在系统变量编辑对话框中,下面所示的,添加Android SDK的路径(注意:Android SDK 下的tools文件夹的路径)-用分号来和存在的路径分隔-并点击OK来应用你的更改,再次点击环境变量窗口上的OK。3、 浏览 Android SDK(1) 使用 Android SDK 文档 Android文档位于Android SDK里的Docs文件夹中在/%sdk 文件夹%/DOCS下。和Android SDK一起被提供的Android 文档包括下载和安装SDK的步骤、快速开始开发应用程序的步骤、包的定义。这个文档是HTML格式的并能在SDK文件夹根目录下通过

40、documentation.html来使用。通过documentation.html中的超链接,你可以导航到Android SDK中包含的所有文档。(2) 使用 Android SDK 工具(3) 使用例子程序 使用Eclipse把API Demos作为新的Android 工程项目加载。要这样进行,从Eclipse菜单栏中选择File|New|Project;一个新的Android 工程项目向导就打开了。从现在不要担心在这个向导中的选项了。选择“从已有的资源创建工程”并浏览加载有API Demo运用程序的文件夹到里面。当工程已经加载,选择“Run”来看看它在Android模拟器中执行。(4) 学习 Android 应用程序生命周期 在许多程序的生命周期中,Android应用程序生命周期中系统控制方面是独一无二的。所有正在运行的进程被Android监视并依赖于这个Activity是如何运行(当前的Activity,一个已分配的Activity,后台Activity,或是第四种),Android可能会选择终止这个Activity来收回需要的资源。所有Android 程序,或是Activity,是在它们自己进程中允许的。

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 科普知识


经营许可证编号:宁ICP备18001539号-1