android *#06#_现在在Android#20中

android *#06#

Welcome to Now in Android, your ongoing guide to what’s new and notable in the world of Android development.

欢迎使用Android Now,这是您持续不断的有关Android开发领域新事物和着名指南。

Remember how last time there wasn’t much to cover? Now you know why; we were saving it up for an avalanche of great developer content that we’ve posted in the past couple of weeks. So this episode is a bit of a long one…

还记得上次没有多少要报道的吗? 现在你知道为什么了; 我们将其保存为过去两周发布的大量开发人员丰富内容。 所以这一集有点长…

NiA20视频和播客形式 (NiA20 in Video and Podcast Form)

This Now in Android is also offered in video and podcast form. It’s the same content, but with less reading required. The article version (keep reading!) is still the place to come for links to all of the content that’s covered.

Android中的 This Now也以视频和播客形式提供。 内容相同,但所需的阅读量更少。 仍然可以使用文章版本(请继续阅读!)链接到所涵盖的所有内容。

视频 (Video)

播客 (Podcast)

Click on the link below, or just subscribe to the podcast in your favorite client app.

单击下面的链接,或只订阅您喜欢的客户端应用程序中的播客。

Android 11 Beta…发布! (Android 11 Beta… Launched!)

Image for post

The original plans for a “launch” event for Android 11 changed to a quieter version; we simply made the Beta available, along with several videos covering the details of various features in Android 11, as well as related tools and unbundled libraries.

Android 11的“启动”事件的原始计划已更改为更安静的版本; 我们只是提供了Beta版本,还提供了一些视频,涵盖了Android 11中各种功能的详细信息以及相关工具和未捆绑的库。

To learn more about this release and how to take advantage of all of the new capabilities in Android 11 (as well as our tools and unbundled libraries), check out the blog which has an overview of the release, download the Beta, and then watch the Android 11 video playlist. Sit back, relax, and learn about all of the new developer features in Android 11, Android Studio, Jetpack Compose, Hilt, Paging, System UI, Play Console, and more.

要了解有关此版本的更多信息以及如何利用Android 11中的所有新功能(以及我们的工具和未捆绑的库),请查看具有该版本概述博客下载Beta ,然后观看Android 11视频播放列表 。 坐下来,放松,并了解Android 11,Android Studio,Jetpack Compose,Hilt,Paging,System UI,Play Console等所有开发人员的所有新功能。

Android的11周 (11 Weeks of Android)

Image for post

Because a mere fourteen videos is hardly enough to cover all of the details of what we’ve been working on for developers, we’ve launched a new series of content called 11 Weeks of Android. Each week will bring new content in specific areas, like UI, Jetpack, and Languages.

由于仅14个视频不足以涵盖我们为开发人员所做的所有工作的所有细节,因此我们推出了一系列名为11 Weeks of Android的新内容。 每个星期都会在特定领域带来新内容,例如UI,Jetpack和语言。

第一周:人与身份 (Week 1: People & Identity)

Check out the blog for all of the details from last week, with links to videos, articles, and more.

在博客中查看上周的所有详细信息,以及指向视频,文章等的链接。

第二周:机器学习 (Week 2: Machine Learning)

This week is still in progress, with content like codelabs, screencasts, and information on the Android Developer Challenge winners. Stay tuned to Android Developers (#11WeeksOfAndroid) on Twitter to catch the content as it is posted, and check the Android Developers Blog at the end of the week for the summary and all of the links.

本周仍在进行中,内容包括代码实验室,截屏视频以及有关Android开发人员挑战赛获奖者的信息。 敬请关注Twitter上的Android开发人员 (#11WeeksOfAndroid),以在发布内容时捕获其内容,并在本周末查看Android开发人员博客以获取摘要和所有链接。

下周:隐私和安全 (Next week: Privacy & Security)

Image for post

Android 11聚会 (Android 11 Meetups)

Image for post

With the current pause on in-person events, it’s been great to see the developer community really lean into hosting online events, with speakers streaming presentations and participating in live Q&A. To help these efforts, and to get more information about Android 11 out to everyone that needs it, we worked with our GDG groups to create a series of events specifically around Android 11 and related content.

由于当前的面对面活动暂停,非常高兴看到开发人员社区真正有能力主持在线活动,演讲者流播演示文稿并参与实时问答。 为了帮助这些工作,并向需要它的每个人提供有关Android 11的更多信息,我们与GDG小组合作,专门围绕Android 11和相关内容创建了一系列活动。

These events have already started (Murat Yener, Yigit Boyar, and I called into the first one of these in Istanbul, and Romain Guy, Murat, Yigit and I participated in the BlrDroid meetup in Bangalore last weekend), and will continue through the summer. They are happening all over the world all the time. This week alone, I’ll be participating in events in Berlin, Jakarta, London, and Kolachi.

这些活动已经开始( 穆拉特· 耶纳伊吉特·博亚尔和我在伊斯坦布尔参加了其中的第一场比赛罗曼·盖伊穆拉特伊吉特和我上周末参加了在班加罗尔举行的BlrDroid聚会 ),并将持续到整个夏天。 它们无时无刻不在世界各地发生。 仅在本周,我将参加在柏林, 雅加达 ,伦敦和科拉奇举行的活动。

I’ve never traveled so far so quickly with so little jetlag. And so few frequent flier miles!

我从来没有这么快的时差旅行那么快。 如此少的飞行里程!

Check out the Android 11 Meetups site to find one happening near you.

前往Android 11 Meetups网站 ,看看附近有没有发生。

AndroidX (AndroidX)

There were several AndroidX libraries released in the last couple of weeks (as usual). I won’t call out too many, as most of them are intermediate versions in the alpha, beta, and RC channels, but here are some of the notable exceptions.

在过去的几周中(与往常一样) 发布了几个AndroidX库 。 我不会说太多,因为它们大多数是alphabetaRC通道中的中间版本,但这是一些值得注意的例外。

现在在阿尔法! (Now in Alpha!)

First, there was a veritable plethora of libraries hitting their first alpha release. Check these out to see some of the new functionality we’re enabling in AndroidX.

首先,有许多名副其实的库发布了第一个 alpha版本。 查看这些内容,以查看我们在AndroidX中启用的一些新功能。

Hilt: This is the first release of the new Hilt library for dependency injection on Android. It builds on top of Dagger and is the recommended way to do DI on Android.

Hilt :这是新的Hilt库的第一个版本,用于在Android上进行依赖项注入。 它建立在Dagger之上,是在Android上进行DI的推荐方法。

Note that although the AndroidX version is 1.0.0-alpha01, this library comes from an internal version at Google that already ships with Dagger, which is why we recommend it if it works for you. However, being alpha, we expect APIs to shift a bit before it gets to beta, based on your feedback, so use and adopt as you see fit.

请注意,尽管AndroidX版本为1.0.0-alpha01,但该库来自Dagger随附的Google内部版本,这就是为什么我们建议您使用它的原因。 但是,作为Alpha,我们希望API会根据您的反馈在转换为Beta之前有所变化,因此请按照自己的意愿使用和采用。

Also, be sure to check out the Hilt article mentioned way down below, as well as the code to the iosched app (discussed below), which now uses Hilt.

另外,请务必查看下面提到的Hilt文章 ,以及iosched应​​用程序的代码(下面讨论),该代码现在使用Hilt

Paging 3.0.0: This is the first release of the total rewrite of the Paging library. It has been rewritten in Kotlin to take advantage of coroutines and Flow, though it also has support for RxJava and Guava ListenableFuture primitives, if you prefer these other approaches. Paging, which simplifies and optimizes handling data loading for RecyclerView, is all about asynchronous update, so these changes should make using Paging a lot more powerful and elegant.

Paging 3.0.0 :这是Paging库的全部重写的第一个版本。 尽管您更喜欢这些其他方法,但它还支持RxJava和Guava ListenableFuture原语,但已在Kotlin中对其进行了重写,以利用协程和Flow。 Paging简化并优化了RecyclerView的处理数据加载,所有这些都是关于异步更新的,因此这些更改应使使用Paging更加强大和美观。

Startup 1.0.0: The startup library was written to help speed up application launching, by simplifying and collecting startup tasks such as pooling use of a single ContentProvider, compared to the traditional approach of spawning many different ContentProviders (each of which comes with significant startup overhead).

Startup 1.0.0 :与传统的产生许多不同ContentProvider的方法(每种方法都伴随大量启动)相比,该启动库的编写是通过简化和收集启动任务(例如合并使用单个ContentProvider)来帮助加快应用程序的启动速度高架)。

Room 2.3.0: This version of Room is mainly about bugfixes, but also adds support for the new Paging 3 library (see above).

Room 2.3.0 :此Room版本主要是关于错误修正的,但是还增加了对新的Paging 3库的支持(请参见上文)。

Benchmarking 1.1.0: This library makes it easier for you to test the performance of your code (listen to the ADB podcast episode #121 that we had with the team for more details on it). This latest release enables allocation metrics, integration with the Android Studio profiler tool, easier setup, and (of course) bug fixes.

基准测试1.1.0 :该库使您可以更轻松地测试代码的性能(有关详细信息,请收听我们与团队合作获得的ADB播客第121集 )。 最新版本可实现分配指标,与Android Studio探查器工具的集成,更轻松的设置以及(当然)错误修复。

Core 1.5.0: This release syncs with new APIs in Android 11, including ShortcutInfo, Notifications, and more.

核心1.5.0 :此版本与Android 11中的新API同步,包括ShortcutInfo,Notifications等。

Security Crypto 1.1.0: Among other changes, this library now supports releases back to API 21 (Android Lollipop).

安全性加密1.1.0 :除其他更改外,该库现在支持发布回API 21(Android Lollipop)的版本。

现在处于稳定状态! (Now in Stable!)

Also, the following library just hit stable, so if that’s the milestone you were waiting for, this is your chance:

此外,以下库刚刚达到了稳定状态 ,因此如果这是您正在等待的里程碑,那么您就有机会:

Fragment 1.2.5: This bugfix release just hit stable, with backports of some of the fixes going into the future 1.3.0 release.

片段1.2.5 :此错误修复程序版本已稳定发行,其中一些修复程序的后向移植到了将来的1.3.0版本中。

示例代码:IOSched (Sample Code: IOSched)

Image for post

Every year, for Google I/O and the Android Developer Summit, the team continues development on the existing IOSched app, which serves two goals: providing a scheduling app for conference attendees and providing a rich, real-app environment in which to add the latest features and best development practices for sharing with the community.

每年,对于Google I / O和Android开发者峰会,团队都会继续开发现有的IOSched应用程序,该应用程序有两个目标:为会议参与者提供日程安排应用程序,以及提供丰富的,真实的应用程序环境,在其中添加与社区共享的最新功能和最佳开发实践。

This year, with the cancellation of Google I/O, only the latter purpose is served. But we carried on, recently finishing up work on the application. We added things like Kotlin coroutine support and usage of some of the new AndroidX libraries like benchmarking, ViewPager2, and Hilt, and have just published the code on GitHub.

今年,随着Google I / O的取消,仅实现了后者。 但是我们继续进行,最近完成了该应用程序的工作。 我们添加了诸如Kotlin协程支持之类的功能,并使用了一些新的AndroidX库(例如基准测试,ViewPager2和Hilt),并且刚刚在GitHub上发布了代码

文章和视频 (Articles & Videos)

带有Hilt的Android上的依赖注入 (Dependency Injection on Android with Hilt)

Manuel Vivo posted an article on the new Hilt library for doing dependency injection on Android (see the above AndroidX section for more on Hilt. Or just go read this article).

Manuel Vivo在新的Hilt库上发布了一篇文章,介绍了如何在Android上进行依赖项注入(有关Hilt的更多信息,请参见上面的AndroidX部分。或者直接阅读本文)。

Jetpack的新功能 (What’s New in Jetpack)

Florina Muntenescu posted this article, which is an extended version of Yigit Boyar’s video that was posted as part of the Android 11 playlist. The article gives an overview of recent libraries, including Hilt, Paging 3, Autofill, SeekableAnimatedVectorDrawable, using the Database Inspector in Android Studio for debugging Room apps, WindowManager, and MotionLayout. The article also talks about new capabilities in existing libraries, like… you know what, it’s probably easiest if you just go read the article to get this stuff first hand:

Florina Muntenescu发布了这篇文章,这是Yigit Boyar视频的扩展版本,已发布为Android 11播放列表的一部分。 本文概述了最新的库,包括Hilt,Paging 3,Autofill,SeekableAnimatedVectorDrawable,这些库使用Android Studio中的数据库检查器调试Room应用,WindowManager和MotionLayout。 本文还讨论了现有库中的新功能,例如……您知道什么,如果您直接阅读该文章以直接获得这些东西,那可能是最简单的:

在Android Studio中进行调试 (Debugging in Android Studio)

David Herman from the Android Studio team posted an article with great debugging tips he gathered from his team:

Android Studio团队的David Herman发表了一篇文章,其中包含了他从他的团队那里收集到的大量调试技巧:

I learned a lot from this piece, including:

我从这篇文章中学到了很多东西,包括:

  • Setting up filters for logcat so you see only the information you want to

    为logcat设置过滤器,以便您仅看到想要的信息
  • Attaching the debugger to an app that’s already running (instead of restarting it with the debugger)

    将调试器附加到已经运行的应用程序(而不是使用调试器重新启动它)
  • Several tips on breakpoints

    断点的几个技巧
  • Stacktrace analysis to help nail down which parts are coming from your code

    Stacktrace分析可帮助确定哪些部分来自您的代码
  • … and much, much more! (Seriously — it’s a loooooong article with tons of tips)

    ……还有更多! (严重的是,这是一篇有很多技巧的文章)

There’s also a video version of this information if you prefer; the article is based on a presentation from the Android Developer Summit back in October of 2019:

如果您愿意,还可以提供此信息的视频版本。 本文基于2019年10月的Android开发者峰会的演讲:

系统跟踪 (System Trace)

Yi Yang posted this article about recent improvements to the System Trace tool in Android Studio.

Yi Yang发表了有关Android Studio中系统跟踪工具的最新改进的文章。

System Trace is Android Studio’s version of the systrace tool that we have used internally for years to analyze difficult performance problems. Systrace allows you to see detailed information about what all of the threads in your app are doing, as well as information about what else is happening in the system overall. system trace allows you to see this information directly in the IDE.

System Trace是systrace工具的 Android Studio版本,我们在内部已使用多年,以分析棘手的性能问题。 Systrace允许您查看有关应用程序中所有线程正在执行的操作的详细信息,以及有关整个系统中正在发生的操作的信息。 系统跟踪使您可以直接在IDE中查看此信息。

System Trace was created to enable a cleaner UI for systrace, to make it easier to both capture and visualize the results. One significant difference between these two versions of systrace is that systrace output is seen in the browser, whereas System Trace is integrated into Android Studio. Also, System Trace (the Studio version) only contains information on the app that you are debugging, not other processes running in the system (with the notable exception of some additional information from the SurfaceFlinger process, which works closely with your app’s rendering pipeline and is thus helpful in analyzing rendering performance problems). And System Trace uses Perfetto internally on API 28+, to take advantage of our latest instrumentation technology.

创建系统跟踪是为了使systrace的UI更加整洁,以便更轻松地捕获和可视化结果。 两种版本的systrace之间的一个重要区别是,在浏览器中可以看到systrace输出,而System Trace已集成到Android Studio中。 另外,系统跟踪(Studio版本)仅包含您正在调试的应用程序上的信息,而不包含系统中正在运行的其他进程(值得注意的是,SurfaceFlinger进程中的一些其他信息与应用程序的渲染管道和因此有助于分析渲染性能问题。 而系统跟踪使用普菲内部的API 28+,把我们的最新仪器技术的优势。

化身 (Reification)

Murat Yener posted a video version of the article Reification of the Erased that I covered in Now in Android #19:

Murat Yener发布了我在Android#19的Now中介绍的文章擦除的修复化的视频版本:

文件 (Docs)

喷气背包 (Jetpack)

Image for post

Jetpack has a new landing page, with information on Jetpack overall as well as some of the latest developments in this huge suite of libraries.

Jetpack有一个新的登录页面 ,其中包含有关Jetpack的总体信息以及此庞大的库套件中的一些最新开发信息。

现代Android开发 (Modern Android Development)

Image for post

We’ve talked about Modern Android Development a few times over the past couple of years. but we thought it was time to more concretely define what we mean by that phrase (spoiler alert: it’s a subset of the APIs, tools, languages, and distribution mechanisms we offer that we believe all Android developers should adopt for creating the best Android applications). The new landing page covers more of the details, with helpful links to help you get started or (because many of you use many of these pieces already) to use even more of these pieces in your development life.

在过去的几年中,我们已经多次谈论了现代Android开发。 但我们认为现在是时候更具体地定义该词组的含义了(扰流警报:这是我们提供的API,工具,语言和分发机制的子集,我们相信所有Android开发人员都应采用此功能来创建最佳的Android应用程序)。 新的着陆页涵盖了更多详细信息,并提供了有用的链接以帮助您入门,或者(因为您中的许多人已经使用了许多此类工具)在您的开发生命中使用了更多此类工具。

亚行播客节目 (ADB Podcast Episodes)

Image for post

There’s been another episode of Android Developers Backstage posted since the last Now in Android. Check it out at the links below, or in your favorite podcast client:

自上次Android版Now发布以来,又发布了Android Developers Backstage一集。 在下面的链接或您喜欢的播客客户端中进行检查:

ADB 142:机器学习学习 (ADB 142: Machine Learning Learning)

In which Tor Norbye and I talked with Hoi Lam and Matej Pfajfar about machine learning on Android. Tune in to learn about ML Kit, TensorFlow Lite, transfer learning, federated learning, ML model binding, the Android Neural Networks API, and more!

在其中, Tor Norbye和我与Hoi Lam和Matej Pfajfar讨论了Android上的机器学习。 收听有关ML Kit,TensorFlow Lite,转移学习,联合学习,ML模型绑定,Android神经​​网络API等的更多信息!

ADB 141:讨论对话 (ADB 141: Discussing Conversations)

In which Tor Norbye, Romain Guy, and I talked with Julia Reynolds and Stefan Franks from the System UI team to have a discussion about Conversations, the new people-oriented feature in Android 11. Conversation notifications now appear in a dedicated space at the top of the notifications shade. Note that this feature works in conjunction with the Bubbles feature, which we also talked about recently, in Episode 140: Bubbles!.

在其中, Tor NorbyeRomain Guy和我与System UI团队的Julia Reynolds和Stefan Franks进行了讨论,讨论了Android 11中以人为本的新功能“对话”。对话通知现在显示在顶部的专用空间中。通知栏。 请注意,此功能与我们最近在第140集:泡泡中也谈到的Bubbles功能一起使用

接着… (Now then…)

That’s it for this time. Go read about and download Android 11 Beta and watch all of the video presentations on developing for the latest Android features! Check out the 11 Weeks of Android site, including the new content from week 1 (People & Identity) and 2 (Machine Learning)! Tune into one of the many Android 11 Meetups happening all over the world! Download and play with the newest AndroidX libraries like Hilt and Paging3! Check out the source code for the IOSched sample app! Go take a look at new articles and videos on Hilt, Jetpack, Android Studio Debugging, System Trace, and Kotlin Reification! See the new landing pages for Jetpack and Modern Android Development! Listen to a podcast on Conversations! And come back here soon for the next update from the Android developer universe.

这次就是这样。 阅读下载 Android 11 Beta,并观看有关开发最新Android功能的所有视频演示 ! 请查看11周的Android网站,包括第1周(人与身份)和第2周(机器学习)的新内容! 收看世界各地发生的众多Android 11聚会之一! 下载并使用最新的AndroidX库,例如Hilt和Paging3! 查看IOSched示例应用程序的源代码! 快来看看有关HiltJetpackAndroid Studio调试系统跟踪Kotlin Reification的新文章和视频! 查看JetpackModern Android Development的新登录页面! 收听对话播客 ! 并很快返回此处,以获取Android开发人员环境的下一个更新。

翻译自: https://medium.com/androiddevelopers/now-in-android-20-9f2072f43ed6

android *#06#

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值