Android工具集 Revision 21

来源:互联网 发布:大麦盒子官网软件 编辑:程序博客网 时间:2024/05/17 04:15

Along with the Android 4.2 SDK, we also launched a brand new update of the Android SDK Tools (Revision 21). The update includes new 

随着Android4.2SDK的发布,我们也开发了全新的Android SDK Tools 。

tools and capabilities that can help you work more efficiently as you create applications. Tools such as a new multi-config editor,

新的版本所包含的工具和功能能让你更有效地开发新应用

and new Lint rules will help you develop apps more quickly, while a new UI test framework will give you more ways automate testing

比如新的“多配置编辑器”和“新 lint 规则”将会帮助你更快的开发app,而新的UI测试框架将给你的app更多的自动测试和问答(QA)

 and QA for your apps. For new developers, one-click SDK download and new app templates help you get started more quickly.

对于新开发者可以一键下载安装而且新的app模板将提供更多的帮助


Multi-config editor

多配置编辑器

A new multi-configuration editor allows you to develop and prototype your UI across various orientations, screen sizes and locales. 

“多配置编辑器”允许你开发和设定UI的方向,屏幕大小和语言环境的原型

For example, while editing your layout in portrait mode, you can see if your edits aren't visible in the shorter landscape

例如当你在protrait模式下编辑布局时,可以看到在横向模式下是否太长以致无法看到

orientation. You can see previews for other screen sizes from small phones to large tablets, you can see previews for the layout

你可以预览其他大小手机,平板等不同大小的屏幕,可以预览.....(不知道怎么翻译了)

using all the available language translations in your app, and so on. You can even see how the layout appears when it is included as

你甚至能看到布局中包含了 另一个包含着fragment的布局。

a fragment in a different larger layout. Finally, Android allows you to create specialized layouts for any of these configurations,

最后,Android与允许创建修改了参数的的布局并在“多配置编辑器”中显示出来(太字面意思了)

and the multi configuration editor shows you these overridden layouts.


Here is a screenshot of the layout editor showing one of the layouts from the Google I/O application, across a variety of screen sizes.

这个图是是在Google I/O大会上的截图




More app templates

更多的app模板

Tools R21 brings three new app templates to help you to easily add new screens to your app. There’s a new full-screen activity for 

工具包中有3个新的app模板,你可以非常简单的添加他们。

use as a photo or video viewer, a settings activity to handle basic user preferences and a login activity to capture

有一个全屏的的activity用来展示图片或视频,有一个设置界面来处理用户信息,一个登陆界面来捕捉用户名和密码

username/password. 




UI Automator Test Framework

UI自动测试框架

One common approach to UI testing is to run tests manually and verify that the app is behaving as expected. UI Automator is a new 

UI测试的一个常用的方法是手动运行测试和验证应用程序是否如预期

software testing framework available in Tools R21 that provides you with tools to easily automate UI testing tasks. It provides a

在工具集中的UI Automator 是一个新的测试框架,他可以提供方便的UI自动测试工具

GUI tool to scan and analyze the UI components of an Android application (uiautomatorviewer), a library containing APIs to create

它提供了图形界面的工具用来扫描分析应用UI中的组件,同样也提供了api来测试自定义的UI,而且一个自动执行的引擎来测试不同的设备

customized functional UI tests, and an execution engine to automate and run the tests against multiple physical devices. UI

UI Automator 要运行在Android4.1版本以上才可以(很犀利的样子)

Automator runs on Android 4.1 (API level 16) or higher. To learn more head over to the UI Testing documentation.


One-click SDK installer

一键下载SDK安装器

New Android SDK developers now have a convenient way to download all the various SDK components like Tools, Platform Tools, Eclipse 

Android初学者现在有一种很输入的方式来下载所有SDK组建,比如.....

ADT, and the latest system image with a single click. Existing developers can continue to manage their SDK components and get

老开发者可以继续使用SDK Manager继续管理。

updates through the SDK Manager. 


Revamped AVD creation dialog

全新的 AVD创建dialog

The new dialog makes it easier to create Android Virtual Devices (AVDs) matching real device profiles. The AVDs will also appear in 

the layout editor to show you how the layouts will look.

这个没什么了




More Lint rules

更多的lint规则

And to wrap things up there are 25 new lint rules which catch several common sources of bugs, for example deviations from Android 

design guide for icons, checks for mismanaged wakelocks, common sources of locale-related bugs and so on. So make sure you upgrade

and let Lint loose on your projects before your next app update!


A minor bug-fix to the Android NDK is also available. For a complete list of what’s new, see the release notes for SDK Tools R21ADT 21.0.0 and Android NDK R8c
原创粉丝点击