天气预报的设计与实现外文翻译资料

 2022-08-22 10:08

Android Studio

Android Studio Setup

The AS3 installer is available for macOS, Windows, and Linux. The download page detects the OS you are using, so you should be able to spot the download button fairly quickly. You will be asked to agree to some terms and conditions before you can proceed with the download. Read it, understand it, and agree to it so you can carry on. After that, the AS3 installed will be downloaded in a zipped file.

If you have an existing installation of Android Studio, you can keep using that version and still install the preview edition. AS3 can coexist with your existing version of Android Studio; its settings will be kept in a different directory.

macOS

You must have seen the installation instruction after the terms and conditions screen; if you havenrsquo;t or you skipped through it, I suggest that you give it a once-over, because there is an installation warning in case you have an existing version of Android Studio. It says that if you downloaded Android Studio version 2.3 or earlier, the application name on macOS installer does not include the version number. So, you may want to rename your existing Android Studio prior to installing the preview version. You can rename your existing Android Studio installation by opening a finder window; then, select “Applications” from the sidebar, find Android Studio, activate the context menu (press Ctrl mouse click), and choose rename. The installation notes for AS3 are at https://developer.android.com/studio/preview/ install-preview.html

  1. Unpack the zipped file
  2. Drag the application file into the Applications folder
  3. Launch AS3
  4. AS3 will prompt you to import some settings; if you have a previous installation, you can import that (it is the default option)

Windows

  1. Unzip the installer file
  2. Move it to a folder location of your choice (e.g., C:AndroidStudio).

Drill down to this folder

  1. Inside, you will find a bin folder; inside it, you will find studio64.exe. This file is what you need to launch. If you are on a 32-bit Windows, the launcher file is named studio.exe

Tip If you right-click studio64.exe and choose Pin to Start Menu, you can make AS3 available from the Windows Start menu; alternatively, you can pin it to the Taskbar.

Linux

The Linux installation requires a bit more work than simply double-clicking and following the installer prompts. In future releases of Ubuntu and its derivatives, this might change and become as simple and frictionless as its Windows and macOS counterparts, but for now, we need to do some tweaking. The extra activities on Linux are mostly because AS3 needs some 32-bit libraries and hardware acceleration.

Note The installation instructions in this section are meant for Ubuntu 64-bit and other Ubuntu derivatives: Linux Mint, Lubuntu, Xubuntu, Ubuntu MATE, and so forth. I chose this distribution because I assumed that it is a very common Linux flavor, hence, readers of this book will be using that distribution.

If you are running a 64-bit version of Ubuntu, you will need to pull some 32-bit libraries in order for AS to function well.

To start pulling the 32 bit libraries for Linux, run the following commands on a terminal window.

When all the prep work is done, the AS3 installation can be managed using the following

steps.

  1. Unpack the downloaded installer file. You can unpack the file using command-line tools or using the GUI tools; you can, for example, right-click the file and select the “Unpack here” option, if your file manager has that option
  2. After unzipping the file, rename the folder to AndroidStudio
  3. Move the folder to a location where you have read, write, and execute privileges. Alternatively, you can also move it to /usr/local/ AndroidStudio
  4. Open a terminal window and go to the AndroidStudio/bin and execute ./studio.sh
  5. At first launch, AS3 will ask you if you want to import some settings; if you have installed a previous version of Android Studio, you may want to import those settings into AS3

Configuring Android Studio

Before we can dive into programming, we need to do a couple of things to complete the development setup. We need to

  • Get some more software so we start creating programs that target a specific version of Android
  • Make sure we have all the SDK tools we need, and optionally
  • Change the way we get updates for AS3

Launch AS3 if you havenrsquo;t done so yet. From the opening dialog, click “Configure” and choose “SDK Manager” from the drop-down list. This should take you to a window where you can select the SDK platforms to download (Figure 2-1).

Figure 2-1. Preferences window

When you get to the SDK window, enable the “Show Package Details” option so you can see a more detailed view of each API level. We donrsquo;t need to download everything in the SDK window. We will get only the items we need.

SDK levels or platform numbers are specific versions of Android. Android 8 or Android “O” is API level 26, and Nougat is API level 24 and 25. You donrsquo;t need to memorize the platform numbers anymore, because AS3 shows the platform number with the corresponding Android nickname.

If you have a pretty fast Internet connection, you may choose to download everything. That way, you can create projects that target multiple versions of Android all the way down to Eclair. For our purposes, we will only download Nougat (platforms 24 and 25) and Oreo

(platform 26). Make sure that together with the platforms, you will also download “G

剩余内容已隐藏,支付完成后下载完整资料


Android Studio

Android Studio Setup

AS3 安装程序可用于 macOS、Windows 和 Linux。在下载页面选择您正在使用的操作系统,因此您应该能够相当快地发现下载按钮。在继续下载之前,您将被要求理解并同意一些条款和条件。之后,安装的 AS3 将下载到压缩文件中。如果您有 Android Studio 的现有安装,则可以继续使用该版本,并且仍然安装预览版。AS3 可以共存于您现有的 Android 工作室版本;其设置将保存在不同的目录中。

macOS

您必须在条款和条件选择之后看到安装说明;如果你没有审阅或你跳过它,我建议你仔细阅读它一次,因为如果你有一个现有的版本的Android工作室,那么他就会给你安装提示。如果你下载Android工作室版本2.3或更早,macOS安装程序上的应用程序名称将不包括版本号。因此,您可能需要在安装预览版本之前重命名现有的 Android Studio。您可以通过打开查找器窗口来重命名现有的 Android Studio 安装;然后,从侧边栏中选择'应用程序',找到 Android Studio,激活上下文菜单(按 Ctrl 鼠标单击),然后选择重命名。AS3 的安装说明位于https://developer.android.com/studio/preview/ install-preview.html

  1. 解压缩压缩文件
  2. 将应用程序文件拖到'应用程序'文件夹中启动 AS3
  3. AS3 将提示您导入某些设置;但是,AS3 会提示您导入某些设置。如果您有以前的安装,您可以选择导入 (这是个默认选项)

Windows

  1. 解压缩压缩文件
  2. 将其移动到您选择的文件夹位置(e.g., C:AndroidStudio). 选择安装到此文件夹.
  3. 在安装文件夹内,你会发现一个垃圾箱文件夹;在里面,你会发现studio64.exe。此文件是您需要启动的内容。如果您在 32 位 Windows 上,则启动文件名为studio.exe

提示:如果右键单击 Studio64.exe 并选择'按键到开始'菜单,则可以从 Windows 开始菜单中使 AS3 可用;如果右键单击 Studio64.exe,然后选择'从'开始'菜单中选择 AS3。或者,您可以将其固定到任务栏。

Linux

Linux 安装需要的工作比简单地双击和遵循安装程序提示多一点。在安装未来版本的Ubuntu及其衍生文件时,这些选项可能改变,变得像它的Windows和macOS一样,简单并且无冲突,但现在,我们需要做一些调整。Linux 上的额外活动主要是因为 AS3 需要一些 32 位库和硬件加速措施。.

注意事项: 本节中的安装说明适用于 Ubuntu 64 位和其他 Ubuntu 版本: Linux Mint, Lubuntu, Xubuntu, Ubuntu MATE, 等等. 我选择这个发行版,因为我认为它是一个非常常见的Linux风格,因此,这本书的读者将使用该版本。

如果您正在运行 Ubuntu 的 64 位版本,则需要提取一些 32 位库才能使 AS 正常工作得更好.

要开始运行 Linux 的 32 位库,则要在终端窗口中运行以下命令。完成所有准备工作后,可以使用以下步骤管理 AS3 安装

  1. 解压缩下载的安装程序文件。您可以使用命令行工具或使用 GUI 工具解压缩文件;例如,您可以右键单击文件并选择'在此处解包'选项(如果文件管理器具有该选项 。
  2. 解压缩文件后,将文件夹重命名为 Android Studio
  3. 将文件夹移动到已读取、写入和执行权限的位置。或者,您也可以将其移动到/usr/local/ Android Studio
  4. 打开终端窗口,转到 Android Studio /bin and execute ./studio.sh
  5. 在第一次启动时,AS3 会询问您是否要导入某些设置;例如,要导入某些默认设置。如果您安装了 Android Studio 的早期版本,则可能需要将这些设置导入 AS3

Configuring Android Studio

在深入了解编程之前,我们需要做几件事情来完成开发设置。我们需要

  • 1. 获取更多软件,以便我们开始创建针对 Android 特定版本的程序
  • 2. 确保我们拥有所有所需的 SDK 工具,并可以自由选择
  • 3. 更改我们获取 AS3 更新的方式

如果您尚未启动 AS3,则启动 AS3。在打开对话框中,单击'配置'并从下拉列表中选择'SDK 管理器'。这应该会带您到一个窗口,在那里您可以选择要下载的 SDK 平台 (Figure 2-1).

Figure 2-1. Preferences window

跳转 SDK 窗口时,请启用'显示包详细信息'选项,以便查看每个 API 级别的更详细的视图。我们不需要下载 SDK 窗口中的所有内容。我们只需要安装我们需要的程序。

SDK 级别或平台编号是 Android 的特定版本。Android 8 或 Android'O'是 API 26级别 的版本,Nougat 是 API 24 和 25级别的版本。您不再需要记住平台编号,因为 AS3 显示带有相应 Android的平台号。

如果你有一个网速较快的网络,你可以选择下载所有文件。这样,您可以创建针对多个版本的 Android 的项目,一直到 Eclair。出于我们的目的,我们只会下载Nougat(平台24和25)和Oro(platform 26). 为了确保与平台一起完善,您还将下载'谷歌 API 英特尔 x86 Atom_64系统映像'。当我们到达测试运行应用程序的部分时,我们需要这些。

注意事项: 构建早期 Android 版本的应用程序而无需下载所有 API 级别的另一种方法是使用 Android 支持库;这些库为我们提供了向后兼容性。

完成选择后,单击'确定'按钮以启动下载过程 (Figure 2-2).

Figure 2-2. SDK platforms

接下来,我们将前往'SDK 工具'选项卡。这与'初始选项'窗口上的同一部分相同,在'初始选项'窗口中。只需单击中间的选项卡即可查看工具的详细信息 (Figure 2-3).

Figure 2-3. SDK tools

您通常不必更改此窗口中的任何内容,但检查您是否具有以下包不会造成冲突.

Android SDK Platform Tools 它包含重要的工具,如 adb,这将帮助我们执行诊断和调试,sqlite3,我们可以在创建使用数据库的应用程序以及其他几个工具时使用这些工具。

Android SDK Tools 这包括基本的Android工具,如ProGuard。您无需深入了解这些工具的详细信息(目前)。只要确保这个选项框是勾选的。

Android Emulator 你一定会用这个。这是一个设备仿真工具。我们将用它来在虚拟设备中测试我们的应用程序。

Support Repository

如果你想编写针对Android Wear,Android TV,或谷歌提供的代码,你就下载这个。其中还包含支持库的本地 Maven 存储库。支持存储库还允许您在较旧的 Android 版本上使用新功能。

HAXM Installer

如果您使用的是 macOS 或带有英特尔处理器的 PC,则可以使用此方法。它是 Android 仿真器的加速器.

提示: 如果您使用的是 Linux 平台,即使您拥有英特尔处理器,也不能使用 HAXM。

KVM 将代替HAXM在 Linux 中被使用。

下载一些指定平台并检查 SDK 工具后,我们可以转到最后一个配置项,即'更新通道'。可以从'首选项'对话框窗口更改此设置。从打开对话框窗口中,选择'配置',然后选择'首选项' (Figure 2-4).

Figure 2-4. Preferences

在'默认首选项'的左侧,选择'更新' (Figure 2-5).

Figure 2-5. Update Channel

AS3,就像任何 Android Studio 安装在默认情况下配置为从您最初下载安装程序的通道获取更新一样。在撰写本文时,AS3 是从 “Canary” 频道 (也称为预览频道),因此,默认情况下,它从Canary频道获取更新。您可以将通道更改为这四个通道中的任何一个:

  • Canary Channel: 拥有 bleeding-edge 渠道; 它可以每周更新。您不会想将此用于撰写代码
  • Dev Channel: 就像Canary频道,但更稳定一点。您仍不想将此用于撰写代码。
  • Beta Channel: 它包含释放候选项。开发人员基本上在等待反馈,然后再被送入稳定通道
  • Stable Channel: 这是官方稳定发布,适合撰写代码工作

注意事项: 当项目在全视图中打开时,可以在 AS3 中访问'首选项'窗口。您不必始终从 AS3 打开窗口启动它。当您在 AS3 内部时,请按照下一条说明启动'首选项':

  • 对于macOS系统: on the menu bar, Android StudioPreferences, then on the left pane select

Appearance amp; BehaviorSystem SettingsUpdates

  • 对于Windows系统: on the menu bar, FileSettings, then on the left pane select Appearance amp; BehaviorSystem SettingsUpdates

The Android Studio IDE

以下部分指出了 AS3 的一些常见特征。我们将在下一章中创建第一个项目,因此,在开始创建某些项目后,您可能希望引用此部分。现在,让我们熟悉 AS3。

AS3基于Jetbrain的IntelliJ IDE,所以如果你有机会使用它,AS3将非常熟悉。即使您来自另一个 IDE,如 Eclipse 或 Netan,许多 AS3 功能也应该非常熟悉。Figure 2-6 展示了一些基础模块.

Figure 2-6. Android Studio IDE

Editor window

这是最突出的窗口,它有最宽广的显示窗口。编辑器窗口是您可以创建和修改项目文件的位置。它的外观会根据您编辑的内容而变化。如果您正在处理程序源文件,此窗口将仅显示源文件。如果要编辑布局文件,可能会看到原始 XML 文件或布局的可视化呈现,就像您在上一章中看到的一样

Navigation bar

这个模块允许您导航项目文件。它只是'项目文件'窗口的更紧凑的视图。这是一个水平排列的箭头框的集合,类似于某种痕迹导航,你可以找到一些网站。您可以通过导航栏或项目工具窗口打开项目文件

Toolbar

工具栏允许您执行较多的操作:保存文件、运行应用、打开 AVD(Android 虚拟设备)管理

剩余内容已隐藏,支付完成后下载完整资料


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

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

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