[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Choose a camera library\n\n| **Note:** If you want to perform basic camera actions like capturing a photo or video using the device's default camera application, see [Camera intents](/training/camera/camera-intents).\n\nIf you want to add camera functionality to an Android app, you have three main options:\n\n- [CameraX](/media/camera/camerax)\n- [Camera2](/media/camera/camera2)\n- [Camera](/media/camera/camera-deprecated) (deprecated)\n\nFor most developers, [CameraX](/training/camerax) is recommended. CameraX is a Jetpack library that supports the vast majority of Android devices (Android 5.0 and higher) and provides a consistent, high-level API designed around common use cases. CameraX resolves device compatibility issues for you so that you don't have to add device-specific code to your app.\n\nCameraX is built on top of the [Camera2](/training/camera2) package. If you need low-level camera control to support complex use cases, Camera2 is a good option, but the API is more complex than CameraX. It requires you to manage device-specific configurations. Like CameraX, Camera2 works on Android 5.0 (API level 21) and higher.\n\nThe original Android [Camera](/training/camera-deprecated) class is deprecated. New apps should use CameraX (recommended) or Camera2, and existing apps should migrate to take advantage of new features and to avoid losing compatibility with future devices."]]