Android Studio集成开发环境介绍外文翻译资料

 2022-07-13 08:07

An Introduction to the Android Studio Integrated Development Environment

Abstract

During this chapter, we will take a look at how the Android Studio development environment and platform works. Android OS has moved away from using the Eclipse Integrated Development Environment (IDE) with Android Development Tools (ADT), and as of 64-bit Android 5.0 and later, has adopted the IntelliJ IDEA (Integrated Development Environment Application). We installed IntelliJ as part of Android Studio 2.3 in the previous chapter, and have already used some of its configuration tools and dialogs, such as the SDK Manager, to configure it for basic Android application development usage.

Keywords

JavaCode AndroidApplication IntegrateDevelopmentEnvironment Android Device Frame Animation

During this chapter, we will take a look at how the Android Studio 2.3 development environment and Android platform works. Android OS has moved away from using the Eclipse Integrated Development Environment (IDE) with Android Development Tools (ADT) , and as of 64-bit Android 5.0 and later, has adopted the IntelliJ IDEA (Integrated Development Environment Application). We installed IntelliJ as part of Android Studio 2.3 in the previous chapter, and have already used some of its configuration tools and dialogs, such as the SDK Manager, to configure it for basic Android application development usage.

To cover this overview of Android Studio 2.3 and IntelliJ IDEA properly, and still make steady progress toward actual hands-on Android application development at the same time, in this chapter I will show you the work process for creating an empty Android application “bootstrap.” This is the foundation that you will always use when you start creating your Android applications. This bootstrap application structure provides you with the basic foundation of an Android 7.1.1 application, which also makes it perfect for Absolute Beginners to learn the minimum code structure that Android applications are built on. This includes an Android Activity Java class, an Android Manifest application definition XML file, a PNG32 Android application icon, a basic menu system XML definition, and a basic user interface (UI) layout container XML definition.

We will take a closer look at all of the basic Android application components during this chapter, by looking at the Android application resource folder structure in IntelliJ IDEA, which the Start a New Android Project series of dialogs will also automatically create for you. As you have seen already in Chapter 2, this is inside of the Android Studio start menu, which you saw in red as the first item in the middle section of the screenshot in Figure 2-5.

We will do a detailed examination of the bootstrap (empty) Android application file and folder structure in IntelliJ. This will tell you how Android Studio 2.3 (and Android 7 OS) wants to see your application components and assets structured and organized. We will also take a detailed look at some other resource folders that are not auto-created in the bootstrap Android application project folder structure, so that you know what you can optionally create yourself. You will be creating some of these specialized resource folders during the book, such as the /res/anim/ folder, which holds XML animation definitions. Custom resource folders usually hold new media assets such as animation, video, audio, user interface designs, and other assets that will enhance the Android application user experience.

As you progress in your knowledge of Android, you will enhance the application foundation that you will put into place in this chapter into something that is truly impressive, and learn more about the Android 7.x OS as well as Android Studio 2.3 and IntelliJ IDEA in the process. After you get some high-level overview regarding how everything fits together inside Android Studio, we can then start “drilling down” into XML for asset definition and Java 8 for application logic programming during Chapters 4 and 5.

Android Application Structure: Java, XML, and Assets

Android 7 components are built on the solid foundation of the 64-bit Linux OS Kernel. Android 6 runs on Linux Kernel 3.18.10, and Android 7 runs on Linux Kernel 4.4.1 or later. Later Linux Kernels have more features and fewer bugs, as you might expect.

On top of the are a massive number (thousands) of high-level Java functions, or Java methods, that are logically arranged by using Java classes. These classes are stored by what tasks they accomplish using around one hundred Java packages. These packages are further organized into Java libraries, or APIs, which simplify your task of communicating with Android and its Linux Kernel as well as with device hardware.

This is inherently complex, as you might well imagine, so donrsquo;t expect to cover all of Android 7rsquo;s functionality in one book (or even a dozen, for that matter). Irsquo;ll cover Java 8 concepts of libraries and packages, as well as what Java objects, constants, classes, and methods are, during Chapter 5.

On top of this complex Java code libraries layer, you can define app assets using a high-level (and less complex) layer of XML markup. XML markup allows you to more easily define your applicationrsquo;s Java object structures, as well as any data constants that will be used in your Java 8 programming logic. Additionally, XML markup can define your application UI design, style, theme, and new media assets. These design-oriente

全文共26064字,剩余内容已隐藏,支付完成后下载完整资料


译文

Android Studio集成开发环境介绍

摘要

在这一章中,我们将看看Android开发环境和平台是如何工作的。Android操作系统已从利用Eclipse集成开发环境(IDE)与Android开发工具(ADT)离开。64位的Android 5及以后的版本是采用IntelliJ IDEA(集成开发环境中的应用)。我们安装IntelliJ为Android Studio 2.3部分,在前面的章节中,已经用到它的一些配置工具和对话框,如SDK管理器,配置为使用基本的Android应用程序开发。

关键词

java代码、Android应用程序的集成开发环境、Android设备、帧动画。

在这一章中,我们将看看Android 2.3开发环境和Android平台是如何工作的。Android操作系统已从利用Eclipse集成开发环境(IDE)与Android开发工具(ADT)离开。64位的Android 5及以后版本采用IntelliJ IDEA(集成开发环境中的应用)。我们安装IntelliJ为Android Studio 2.3部分,在前面的章节中,已经用它的一些配置工具和对话框,如SDK管理器,配置为使用基本的Android应用程序开发。

要概述Android Studio 2.3和IntelliJ IDEA得当,仍然向实际动手Android应用开发稳步推进,在这一章中我会告诉你建立一个空的Android应用”引导的工作过程。“这是当你开始创建你的Android应用程序基础。这个引导应用结构为你提供了一个Android 7.1.1应用的基础,这也使得它非常适合初学者学习,Android应用都是建立在最小的代码结构上。这包括Android Activity的java类,Android清单应用程序定义的XML文件,一个png32 Android应用程序图标,一个基本的菜单系统的XML定义,和基本的用户界面(UI)布局容器的XML定义。

我们将在本章仔细看看所有的Android应用程序的基本组件,通过Android应用资源文件夹结构IntelliJ IDEA,从而开始一个新的对话框,同时android项目系列也将为你自动生成。正如您已经在第2章中看到的,这是在Android开始菜单中,您在红色中看到的是图2-5中截图中间部分的第一项。

我们会做一个引导的详细检查(空)的Android应用程序文件和文件夹结构IntelliJ。这将告诉您Android Studio 2.3(和Android 7操作系统)希望看到您的应用程序组件和资产结构和组织。我们还将详细查看一些未在自举Android应用程序文件夹结构中自动创建的其他资源文件夹,以便您知道您可以随意创建自己的资源文件夹。您将创建一些专门的资源文件夹中的书,如/ res/anim/目录,使XML动画定义。自定义资源文件夹通常包含新的媒体资产,如动画、视频、音频、用户界面设计以及其他增强Android应用程序用户体验的资产。

随着你的进一步了解安卓,你将会会得到提高,你在本章的东西是令人印象深刻的应用基础,并有助于更多的了解关于Android 7的相关知识。X操作系统以及Android Studio 2.3和IntelliJ IDEA的过程中。你得到一些关于如何配合在Android的工作室的概况后,我们就可以“钻”到XML的资产定义和java应用逻辑编程中的8章4和5。

Android应用程序的结构:java,xml,和资产 Android 7组件是建立在64位Linux内核的坚实基础之上的。Android 6运行在Linux内核3.18.10,和Android 7运行在Linux内核4.4.1或之后版本。后面版本的Linux内核正如期望的那样具有更多的特性和更少的bug。

在上面的是一个大数(千)高级java功能,或java的方法,是用java类的逻辑安排。这些类所完成的任务使用一百左右的java包存储。这些软件包进一步组织成java库或API,简化你的沟通与Android和Linux内核以及硬件设备的任务。

正如你想象的那样,这本质上是复杂的,所以不要期望在一本书中(甚至是一打)中涵盖Android 7的所有功能。我会在5章概括java 8库和包的概念,以及什么是java对象、常量、类和方法。

在这复杂的java代码库层,你可以使用一个高层次的定义应用程序资产(和不太复杂的XML标记层)。XML标记可以让你更容易地定义你的应用程序的java对象的结构,以及任何常数数据将用于java 8编程逻辑。此外,XML标记可以定义应用程序UI设计、样式、主题和新媒体资产。这些面向设计的资产允许您控制Android应用程序的外观、声音和功能,并最终定义用户体验。

由于XML更容易创建Android应用程序内容,所以我将在本书的中间五章中使用它,向您展示如何定义各种应用程序组件、资产、外观和感觉。在第6章到第10章中,我将介绍基于XML的UI、图形和动画设计。图3-1显示了一个Android应用程序的结构层次,从Linux操作系统的内核的基础上,对开发者隐藏;8,java,xml,和新媒体资产,开发人员创建,代码,设计,定义和构建,最终把这些层连成一个Android应用程序。这些层从底层到顶部往往会降低复杂性,特别是如果您的新媒体资产已经存在的话。

图3-1.

Android操作系统的基础:从Linux内核,对java库,XML定义,应用媒体资产 。从头开始创建新的媒体资产可以作为java编程可以是复杂的,所以如果你的资产已经不存在,这些水平的降低复杂度并不一定是真的。如果你想开始掌握新媒体内容生产的道路,我必须掌握新媒体的基本面一系列的六本书(搜索这个作者的名字,在http://www.apress.com),以及Android的工作室新媒体基础(新闻,2015)的称号,它包含的信息和工作流程关于3D、数字音频、数字视频、数字图像合成,和数码插图(SVG)新媒体内容创作。

Android 7平台结构:开放的集合

技术

正如您所了解的,Android构建的基础是经过精心编码、经过精心测试的Linux内核。Linux及其核心服务管理物理硬件的智能手机、平板电脑、电子书阅读器、智能手表和电视台,给Android应用程序的完全访问每一个消费电子设备的功能,包括GPS、触摸屏、内存、数据存储、摄像头、闪光灯、陀螺仪、罗盘、加速度传感器、气压传感器、生物(电子)传感器,蓝牙,Wi-Fi,NFC,4G LTE,USB,以及更多。

然而,Linux并不是单独完成的。Android有一个广泛的java API库,提供高级定制的功能和服务,比如SQLite数据库管理、图像合成、图像融合、SVG渲染、三维渲染、网页(HTML5,CSS3和JS)绘制,数字音频播放,数字视频流,基于框架和程序动画,蓝牙,和更多的。这些大部分都是基于开放技术,如SQL,GIF,SVG,WebKit、OpenGL、Vulkan、PNG,FLAC,OGG Vorbis,Ogg Theora,VP8,和VP9。一些“几乎”开放源码(这些专利在几年内到期)已经被谷歌授权为Android,如MPEG-4、MP3、浪潮、BMP、JPEG、蓝牙以及类似的新媒体技术。

高级java功能库,Android应用程序开发者使用他们的应用程序的创建。这使得开发人员不必直接与低级操作系统功能“交谈”。这样做使应用程序开发变得更容易一个数量级!你将学习一些核心java 8功能库,用于开发这本书的过程中,Android 7.1.1应用,从本章开始的时候,我们看一下基本的(空)的Android应用程序启动java代码。

在用户端的Android操作系统(相对于开发人员,我们将在本书中关注)还包括大量的“最终用户实用程序”应用程序,Android设备用户已经在他们的Android设备上得到了预期。其中的例子包括电话管理工具、电子邮件客户端、各种社交媒体平台客户端、联系人管理器、网络浏览器、闹钟、日历、谷歌地图、谷歌搜索、媒体播放器,还有一些基本的休闲游戏,仅举几例。

Android操作系统支持所有流行的开放源代码的新的媒体格式,开发商将要在应用程序中使用,包括强大的On2 VP9视频编解码器,在Android 5中加入。On2公司被谷歌收购,而VP8和VP9是一个开源的视频编解码器为WebM发布,你可以找到在Android以及浏览器如Firefox,Opera,Chrome。两WebM和MPEG-4 H.264 AVC视频编解码器的质量文件大小的比例,“因此他们的播放性能,是相当令人印象深刻的开源视频编解码器。还加入了Android 5的播放mpeg-h H.265 HEVC内容的能力。

本章的下一节介绍了java的Dalvik Virtual Machine(VM),从而优化你的java代码,所以它会执行有效的低功耗嵌入式(便携式消费电子设备和电视台)。

在这本书中你可以结合使用XML和java构建应用程序。这些位于操作系统顶部的层,如图3-1所示。然而,你可以,如果你是Android开发先进、直接访问操作系统及其服务水平较低,使用C 语言,利用Android原生开发套件(NDK),而不是使用更高级别的软件开发工具包(SDK),我们将使用这本书。你可以考虑一个需要最快速度的应用程序,比如游戏,或者实时心脏监控训练计划。这是目前Android NDK超出了本书的范围。

现在让我们来看看在运行时,或编译的版本,你的Android应用程序,以及如何使用java字节码与Android的运行时间(艺术)优化运行(最终用户)一个Android应用程序的性能。

Android 7的可执行文件的结构:编译运行java字节码

在Android Studio 2.3开发环境的一切,以及所包含的所有应用程序,创建通过组合使用java代码和XML标记。这是通过IntelliJ和Gradle编译成java“字节”版本的应用程序,将“执行”(运行)使用Android运行时(艺术)的效用,这是Android操作系统的一部分。IntelliJ创造这个字节码,并将它放进。DEX文件格式(类似于一个.exe文件)。

该文件扩展名和数据格式基本上是Android操作系统的紧凑、低级的可执行文件格式,因此运行Android操作系统的Android设备将能够理解和运行。DEX是没有专门的加密,但如果你看看一个编译文件的内容,它将不容易解密。XML流,对java代码,字节码,执行数据如下:

XML(XML)→java(类)→ByteCode(.dex)→应用程序(.apk)→运行(艺术)→显示装置

在Android 4.4只使用Dalvik虚拟机的Android运行环境(DVM);而在Android 4.4中,你可以选择DVM艺术。Android 5和以后只使用艺术。这些运行时给你的应用程序访问硬件设备的特点,以及低级别的Android和Linux内核的功能,这样你就不必去做所有的事,低级编程自己。

好消息是,一个安卓绝对初学者,你不需要对艺术有太多了解,除了这一点,它是在运行时链中提供的代码,它将为你的用户优化你的应用程序做得很好。使用java编程语言,你只会包括在你的程序中你需要的java库适当的组件,使用一些java调用import语句。在你这样做,你的应用程序的代码可以使用内置的java库的能力。你将学会如何把一些这些强大的java库,稍后在本章的工作,在所有的章节,对于这件事,这本书的其余部分中。我们还将覆盖了在java入门5章。

接下来,我将向您展示如何创建第一个Android应用程序,这样您就可以看到如何在高度结构化的Android项目层次中组织Android 7应用程序资产,这必须遵循Android应用程序正常工作的原则。这样我们就可以在Android Studio应用程序开发环境一些实际的使用权,看你如何创建一个新的、空的Android Bootstrap应用基础设施;并开始学习Android开发,Android Studio,java,xml,Gradle,应用资源,和新媒体资产。

创建Android 7应用程序:Android Studio的新项目

现在你可能很渴望火起来的Android Studio和IntelliJ 2016,并创建你的第一个Android 7的应用。我们需要这样做,你能了解java代码,XML标记,和新媒体资产,被称为“资源”的Android,一起工作来创建自己的定制的Android 7的应用。

每一种编程语言都有一个古老的传统,就是让新用户创建一个“Hello World”应用程序。让我们创建我们自己的绝对初学者你好世界Android应用程序,就在这里和现在。就这样,我们做的事情是“开箱”的可能,我们最终将此应用到“你好世界”这本书,我们可以扩大在应用程序(没有双关语意)的引导(空)的应用程序,Android Studio为我们创造我们学习更多关于Android的图形,用户界面设计,等等。我们将添加

全文共9513字,剩余内容已隐藏,支付完成后下载完整资料


资料编号:[9550],资料为PDF文档或Word文档,PDF文档可免费转换为Word

原文和译文剩余内容已隐藏,您需要先支付 30元 才能查看原文和译文全部内容!立即支付

以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。