应用架构

若要确保应用的稳健性、可测试性和可维护性,应用架构设计是一项重要的考量因素。Android 提供了一组库和组件,可帮助您根据最佳做法组建应用。

指南

最新资讯和视频

Updated 2025年3月13日

You can test a ViewModel by simply creating an instance using its constructor in your test code. However, this approach has limitations — there is no straightforward way to: With ViewModelScenario, these are now easy to test, helping you catch errors

Updated 2024年9月3日

In Android 14 we introduced user-initiated data transfer jobs, or UIDT. You can use the new API setUserInitiated in JobScheduler to specify that the job is a user-initiated data transfer job. This API is helpful for use cases that require