Android Jetpack
Jetpack 库 浏览所有库
* 热门和常用的库排在前面
activity * | 访问基于 Activity 构建的可组合 API。 |
appcompat * | 允许在平台的旧版 API 上访问新 API(很多使用 Material Design)。 |
appsearch * | 为用户构建自定义应用内搜索功能。 |
camera * | 构建移动相机应用。 |
compose * | 使用描述界面形状和数据依赖项的可组合函数,以编程方式定义界面。 |
databinding * | 使用声明性格式将布局中的界面组件绑定到应用中的数据源。 |
fragment * | 将您的应用细分为在一个 Activity 中托管的多个独立屏幕。 |
hilt * | 扩展了 Dagger Hilt 的功能,以实现 androidx 库中某些类的依赖项注入。 |
lifecycle * | 构建生命周期感知型组件,这些组件可以根据 activity 或 fragment 的当前生命周期状态调整行为。 |
Material Design 组件* | 适用于 Android 的模块化、可自定义 Material Design 界面组件。 |
navigation * | 构建和组织应用内界面,处理深层链接以及在屏幕之间导航。 |
paging * | 在页面中加载数据,并在 RecyclerView 中呈现。 |
room * | 创建、存储和管理由 SQLite 数据库支持的持久性数据。 |
test * | 在 Android 中进行测试。 |
work * | 调度和执行可延期且基于约束条件的后台任务。 |
ads | 获取广告 ID(无论是否通过 Play 服务)。 |
annotation | 公开元数据,帮助工具开发者和其他开发者了解您的应用代码。 |
arch.core | 其他架构依赖项的帮助程序,包括可与 LiveData 配合使用的 JUnit 测试规则。 |
asynclayoutinflater | 异步膨胀布局以避免界面出现卡顿。 |
autofill | 通过扩展提示,提高自动填充的准确性。 |
benchmark | 在 Android Studio 中准确评估代码的性能。 |
biometric | 通过生物识别特征或设备凭据进行身份验证,以及执行加密操作。 |
bluetooth | 使用向后兼容的 API 使用 Android 平台的蓝牙功能。 |
browser | 在用户的默认浏览器中显示网页。 |
camera.media3 | TODO |
camera.viewfinder | 适用于相机的独立可组合项和基于 View 的取景器” |
car-app | 构建适用于 Android Auto 和 Android Automotive OS 的模板化应用。 |
cardview | 用圆角和阴影实现 Material Design 卡片模式。 |
collection | 降低现有和新的小型集合对内存的影响。 |
compose.animation | 在 Jetpack Compose 应用中构建动画,丰富用户体验。 |
compose.compiler | 借助 Kotlin 编译器插件,转换 @Composable functions(可组合函数)并启用优化功能。 |
compose.foundation | 使用现成可用的构建块编写 Jetpack Compose 应用,还可扩展 Foundation 以构建您自己的设计系统元素。 |
compose.material | 使用现成可用的 Material Design 组件构建 Jetpack Compose UI。这是更高层级的 Compose 入口点,旨在提供与 www.material.io 上描述的组件一致的组件。 |
compose.material3 | 使用 Material Design 3(新一代 Material Design)组件构建 Jetpack Compose UI。Material 3 中包括了更新后的主题和组件,以及动态配色等 Material You 个性化功能,旨在与新的 Android 12 视觉风格和系统界面相得益彰。 |
compose.material3.adaptive | 使用 Material 3 自适应库创建自适应界面,这些界面会根据当前的窗口配置(例如窗口大小类别或设备折叠状态)自动调整自身。该库提供了默认的框架实现和必要的构建块可组合项,以便您创建自己的自定义体验。 |
compose.runtime | Compose 编程模型和状态管理的基本构建块,以及 Compose 编译器插件的目标核心运行时。 |
compose.ui | 与设备互动所需的 Compose UI 的基本组件,包括布局、绘图和输入。 |
concurrent | 使用协程将任务移出主线程,并充分利用 ListenableFuture。 |
constraintlayout | 使用相对定位灵活地确定 widget 的位置和大小。 |
contentpager | 在后台线程中加载 ContentProvider 数据并进行分页。 |
coordinatorlayout | 定位顶层应用 widget,例如 AppBarLayout 和 FloatingActionButton。 |
core | 针对最新的平台功能和 API 调整应用,同时还支持旧设备。 |
core.uwb | 在受支持的设备上实现 UWB(超宽带)。 |
credentials | 此库可提供对用户凭据的统一访问权限。其中包括密码、通行密钥和联合凭据。该库应该用于提供安全顺畅的登录体验。 |
credentials.registry | 为解决这些问题,我们将添加一种新的注册机制,让应用能够以可保护隐私的方式提供数字凭据。概括来讲,提供程序应用将向 Credential Manager 预注册所有候选数字凭据;当 Credential Manager 收到针对特定数字凭据的应用请求时,它将在沙盒中运行凭据匹配和用户选择器界面。 |
cursoradapter | 向 ListView widget 提供光标数据。 |
customview | 实现自定义视图。 |
datastore | 以异步、一致的事务方式存储数据,克服了 SharedPreferences 的一些缺点 |
documentfile | 查看文件文档。 |
draganddrop | 接受来自其他应用或应用内的拖放数据,并显示一致的拖放目标可视效果。 |
drawerlayout | 实现 Material Design 抽屉式导航栏 widget。 |
dynamicanimation | 使用基于物理特性的动画 API 制作流畅的动画。 |
emoji | 在当前设备和版本更低的设备上显示表情符号。 |
emoji2 | 在当前设备和版本更低的设备上显示表情符号。 |
enterprise | 创建企业专用应用。 |
exifinterface | 读取和写入图片文件 EXIF 标记。 |
games | 在您的应用中以原生方式使用 Android Game SDK 来执行复杂的游戏任务,例如帧同步。 |
glance | 使用 Jetpack Compose 样式的 API 构建远程 surface 的布局。 |
graphics | 利用多个 Android 平台版本中的图形工具 |
gridlayout | 实现网格布局。 |
health | 通过平台无关的方式构建高性能健康应用。 |
health.connect | 允许开发者读取或写入用户的健康与健身记录。 |
heifwriter | 使用 Android 设备上可用的编解码器,以 HEIF 格式对图像或图像集进行编码。 |
ink | 激发开发出卓越的触控笔应用的灵感。降低开发者进入高性能、美观的手写体验的门槛。 |
input | 通过预测未来的 MotionEvent 缩短输入互动的延迟时间 |
interpolator | 在旧版平台上使用动画插值器。 |
javascriptengine | 启用您的 Android 应用以评估 JavaScript。 |
jetifier | 一款独立工具,可将某个库中对已废弃支持库的依赖项迁移到等效的 AndroidX 依赖项。 |
leanback | 请改用 Compose for TV,而不是此工件。 |
legacy | 此制品及其类已废弃。从 Android 8 开始,后台检查限制使此类无法再发挥作用。 |
lint | lint 检查以验证 Gradle API 的使用情况 |
loader | 加载配置更改后继续存在的界面数据。 |
localbroadcastmanager | 此制品及其类已废弃。请改用 LiveData 或响应式流。 |
media | 与其他应用共享媒体内容和控件。已被 media3 取代。 |
media2 | 与其他应用共享媒体内容和控件。 |
media3 * | 适用于媒体用例的支持库。 |
mediarouter | 利用通用界面实现在远程接收端设备上显示和播放媒体内容。 |
multidex | 在搭载 Android 5 之前版本的设备上部署包含多个 dex 文件的应用。 |
metrics | 跟踪和报告应用的各种运行时指标 |
palette | 从图片中提取具有代表性的调色板。 |
用于在应用中添加 PDF 查看功能的库。 | |
percentlayout | 此制品及其类已废弃。请改用 ConstraintLayout 和关联布局。 |
效果 | 提供源代码注释以进行性能优化。 |
preference | 无需与设备存储空间交互,也不需要管理界面,便能构建交互式设置画面。 |
通过您的应用打印照片、文档、其他图形及图片。 | |
privacysandbox.activity | TODO |
privacysandbox.ads | 此库支持与可保护隐私的 API(Android Privacy Sandbox 的一部分)集成。 |
privacysandbox.plugins | Android Privacy Sandbox Sdk 库 Gradle 插件 |
privacysandbox.sdkruntime | 此库为 SdkRuntime 感知型使用方提供组件 |
privacysandbox.tools | 用于在 Android 中利用 Privacy Sandbox 功能的库 |
privacysandbox.ui | TODO |
profileinstaller | 让库能够提前预填充要由 ART 读取的编译轨迹。 |
recommendation | 将内容推送到 Android TV 启动器的主屏幕。 |
recyclerview | 在您的界面中显示大量数据,同时最大限度减少内存用量。 |
remotecallback | 创建一个封装容器,以便开发者更轻松地提供 PendingIntent。 |
resourceinspection | 在 Android Studio 的实时布局检查器中显示自定义视图的属性。 |
savedstate | 编写可插入组件,这些组件会在进程终止时保存界面状态,并在进程重启时恢复界面状态。 |
security | 安全地管理密钥并对文件和 sharedpreferences 进行加密。 |
sharetarget | 提供向后兼容性,可以将快捷方式用作直接共享目标。 |
slice | 在应用外显示模板化界面元素。 |
slidingpanelayout | 实现滑动窗格界面模式。 |
startup | 实现一种在应用启动时初始化组件的简单而高效的方法。 |
sqlite | 使用本地 SQLite 数据库。如果可能,请改用 Room。 |
swiperefreshlayout | 实现下拉刷新的界面模式。 |
test.uiautomator | 适用于跨应用功能界面测试的框架 |
textclassifier | 识别文本中的对话、链接、选定内容和其他类似构造内容。 |
tracing | 将跟踪事件写入系统跟踪缓冲区。 |
transition | 使用开始和结束布局为界面中的动作添加动画效果。 |
tv | 为开发者提供 Compose 和 Material Design 功能,以便编写 TV 应用 |
tvprovider | 提供 Android TV 频道。 |
xr.arcore | 借助感知功能将数字内容带入现实世界。 |
xr.compose | 以声明方式构建可充分利用 Android XR 空间功能的空间界面布局。 |
xr.compose.material3 | 使用可适应 XR 的 Material 组件和布局进行构建 |
xr.runtime | 使用我们的原生运行时启动自定义 AR 或 3D 会话。 |
xr.scenecore | 使用 3D 内容构建和操控 Android XR 场景图。 |
vectordrawable | 渲染矢量图形。 |
versionedparcelable | 提供稳定且紧凑的二进制序列化格式,该格式可跨进程传递或安全保留。 |
viewpager | 以可滑动的格式显示视图或 Fragment。如果可能,请改用 viewpager2。 |
viewpager2 | 以可滑动的格式显示视图或 Fragment。 |
wear | 打造适用于 Wear OS by Google 谷歌智能手表的应用。 |
wear.compose | 编写适用于穿戴式设备的 Jetpack Compose 应用,提供相关功能来支持穿戴式设备以及该类设备专属的尺寸、形状和导航手势。 |
wear.protolayout | 此库允许定义一组将在远程 Surface 上呈现/评估的界面布局和非界面表达式。 |
wear.tiles | 打造适用于 Wear OS by Google 谷歌智能手表的应用。 |
wear.watchface | 打造适用于 Wear OS by Google 谷歌智能手表的应用。 |
webkit | 在 Android 5 及更高版本上使用新式 WebView API。 |
window | 帮助支持不同的设备外形规格,例如可折叠设备。 |
window.extensions.core | Window Manager 库扩展的核心 API |
了解如何使用 Jetpack
基础知识培训
实践教程
Sunflower 示例应用
资讯和视频
Compose runtime and performance - Android Developers Backstage
Updated 2025年3月4日
In this episode, Tor and Romain chat with Leland and Chuck from the Compose team about performance -- recent optimizations, upcoming optimizations, and challenges. Listen to the podcast → https://goo.gle/3QKVy8k Catch videos on YouTube →
SoundCloud uses Jetpack Glance to build Liked Tracks widget in just 2 weeks
Updated 2025年3月4日
To make it even easier for users to listen on Android, developers at SoundCloud — an artist-first music platform — turned to Jetpack Glance to create a Liked Tracks widget for their highly-rated app, which boasts 4.6 stars and over 100 million
Meet the Android Studio Team: A Conversation with Android Developer UX Manager, Dan Dole
Updated 2025年2月27日
Welcome to "Meet the Android Studio Team"! In this blog series, we introduce you to the passionate people who create the Android development tools you use every day. Get to know the engineers, designers, product managers, and more who work hard to
Meet the Android Studio Team: A Conversation with Engineering Director, Tor Norbye
Updated 2025年2月20日
Welcome to "Meet the Android Studio Team," our new ongoing blog series. Each week, we'll introduce you to the talented people behind Android Studio. Get to know the engineers, designers, product managers, and more who create the best possible
Compose for TV
Updated 2025年2月19日
Compose for TV is the modern approach for building Android TV user interfaces. Compose for TV unlocks all the benefits of Android's Jetpack Compose for your TV apps, making building beautiful and functional UIs for your app much easier. Jetcaster
Meet the Android Studio Team: A Conversation with Staff Developer Programs Engineer, Trevor Johns
Updated 2025年2月12日
Android Studio isn't just code and algorithms – it's built by real people with fascinating stories. Our "Meet the Android Studio Team" series gives you a glimpse into the lives and passions of the talented individuals who craft the tools you use
Meet the Android Studio Team: A Conversation with Director of Product Management, Jamal Eason
Updated 2025年2月6日
Dive into the world of Android Studio and meet the masterminds behind your favorite development tools! In our recurring blog series, "Meet the Android Studio Team," we'll introduce you to the brilliant engineers, designers, product managers, and more
Testing
Updated 2025年1月30日
Keep your UI delightful by testing it! Previews allow quickly verifying components during development, which can be automated with the preview screenshot testing Gradle plugin to create visual regression tests. Behavior tests can use
Meet the Android Studio Team: A Conversation with Product Manager, Paris Hsu
Updated 2025年1月30日
Welcome to "Meet the Android Studio Team"; a short blog series where we pull back the curtain and introduce you to the passionate people who build your favorite Android development tools. Get to know the talented minds – engineers, designers, product
Apps adopt Transformer to support more reliable and performant media editing use cases
Updated 2025年1月10日
The Jetpack Media3 library enables Android apps to build high quality media apps. As part of the Media3 library, the Transformer module aims to provide easy to use, reliable, and performant APIs for transcoding and editing media. For example, apps
Clipping and masking
Updated 2024年11月27日
Clipping or masking parts of your content is a way to create delightful UI effects, and is a common need when working with custom UI components. Clipping is the process of removing parts of your content based on a set path or shape. Whereas masking
Graphics layers
Updated 2024年11月15日
In this episode, learn all about Graphics Layers in Compose and how you can use the APIs to composite graphics layers together to create interesting visual effects. This episode covers how to use BlendModes to blend between two layers, and how to set
AnchoredDraggable #shorts
Updated 2024年11月7日
In this episode, we cover Compose AnchoredDraggable - an interactive UI element that allows users to drag and swipe it, while maintaining an anchor to its original position. Learn more → https://goo.gle/compose-anchored-draggable Watch more Compose
AnchoredDraggable
Updated 2024年10月30日
In this episode, we cover Compose AnchoredDraggable, which is a Jetpack Compose API that lets you build components that can be dragged between anchor points and settles an anchor point at the end of the gesture. AnchoredDraggable is often used to
CameraX update makes dual concurrent camera even easier
Updated 2024年10月16日
CameraX, Android's Jetpack camera library, is getting an exciting update to its Dual Concurrent Camera feature, making it even easier to integrate this feature into your app. This feature allows you to stream from 2 different cameras at the same
Here's what happening in our latest Spotlight Week: Adaptive Android Apps
Updated 2024年10月14日
With Android powering a diverse range of devices, users expect a seamless and optimized experience across their foldables, tablets, ChromeOS, and even cars. To meet these expectations, developers need to build their apps with multiple screen sizes
Introducing Ink API, a new Jetpack library for stylus apps
Updated 2024年10月8日
With stylus input, Android apps on phones, foldables, tablets, and Chromebooks become even more powerful tools for productivity and creativity. While there's already a lot to think about when designing for large screens – see our full guidance and
Room renovations
Updated 2024年9月24日
In this video, Elif from the Android Toolkit & Jetpack Team will be talking about Room! This past year was a BIG one for Room, and we are excited to share all the renovations we completed as we entered the Kotlin Multiplatform world.
Flow layouts
Updated 2024年9月11日
FlowRow and FlowColumn are similar to Row and Column layouts, however the items will flow into the next row or column when there is no more space in the area. In this video, Flow layouts are covered along with how to use them and tricks for using
Navigation Compose meet Type Safety #shorts
Updated 2024年9月10日
In this video, Clara Fok introduces the new Type Safety feature for Navigation Compose. Watch more Android Conference Talks → https://goo.gle/ConferenceTalks #Featured #AndroidDev #JetpackCompose Speakers: Clara Fok Products Mentioned: Jetpack
Navigation Compose meet Type Safety
Updated 2024年9月10日
In this video, Clara Fok will talk about the new Type Safety feature for Navigation Compose and the new type-safe APIs. Chapters: 0:00 - Introduction 1:43 - Type Safety 4:28 - Building NavGraphs 5:27 - Navigate with arguments 6:32 - Retrieve
Jetpack Compose APIs for building adaptive layouts using Material guidance now stable
Updated 2024年9月9日
The 1.0 stable version of the Compose adaptive APIs with Material guidance is out, ready to be used in production. The library helps you build adaptive layouts that provide an optimized user experience on any window size. The team at SAP Mobile Start
SAP integrated NavigationSuiteScaffold in just 5 minutes to create adaptive navigation UI
Updated 2024年9月9日
SAP Mobile Start is an app that centralizes access to SAP's mobile business suite, a hub for users to keep track of their companies’ processes and data so they can efficiently manage their daily to-dos while on the move. Recently, SAP Mobile Start
Shaders
Updated 2024年8月29日
In addition to Brushes, in Compose there is another delightful mechanism for painting your pixels and rendering graphics on screen, called Shaders. In this episode, we dive into the details of using shaders in Jetpack Compose, combined with render
Learn all about creating Shared elements in Jetpack Compose
Updated 2024年7月23日
🤔 Want to learn all about shared elements in Jetpack Compose? Take a look at our latest video on the topic - tap the link to find out more 🧞 Watch more Android Conference Talks → https://goo.gle/ConferenceTalks #Featured #AndroidDev #JetpackCompose
Advanced layout animations in Compose (Shared elements)
Updated 2024年7月23日
Compose is the recommended modern UI toolkit for Android that makes it easy to create beautiful and delightful user interfaces. A new powerful feature of Compose is the Lookahead layout system. Using this new layouting mechanism, we can create
Top 3 Updates with Compose across Form Factors at Google I/O '24
Updated 2024年6月11日
Google I/O 2024 was filled with lots of updates and announcements around helping you be more productive as a developer. Here are the top 3 announcements around Jetpack Compose and Form Factors from Google I/O 2024: The June 2024 release of Jetpack
A Developer’s Roadmap to Predictive Back (Views)
Updated 2024年5月24日
Before you read on, this topic is scoped to Views. Predictive Back with Compose is easier to implement and not included in this blog post. To learn how to implement Compose with Predictive Back, see the Add predictive back animations codelab and the
Everything you need to know about Google TV and Android TV OS
Updated 2024年5月15日
Over the past year, we’ve seen significant growth of Android TV OS, reaching 220 million monthly active devices with a 47% year-over-year increase. This incredible engagement would not be possible without our dedicated developer community. A massive
Google I/O 2024: What’s new in Android Development Tools
Updated 2024年5月14日
At Google I/O 2024, we announced an exciting new set of features and tools aimed at making Android development faster and easier. We also shared updates to Android Studio that will help you leverage AI and make it easier for you to build high quality