声明依赖项
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
为确保 Driver SDK 与 Fleet Engine 之间的通信顺畅,您需要声明必要的依赖项。这需要向您的项目添加特定库,并且如果使用 ProGuard,还需要更新您的配置文件。
更新 ProGuard 配置
如果您使用 ProGuard 来优化 build,可能需要在 ProGuard 配置文件中添加以下行:
-dontwarn com.google.**
-dontwarn io.grpc.**
-dontwarn okio.**
ProGuard 支持的最低 Android API 级别为 23。
后续步骤
创建身份验证令牌
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eThe Driver SDK requires specific dependencies to communicate with Fleet Engine, including adding libraries and updating ProGuard configuration.\u003c/p\u003e\n"],["\u003cp\u003eIf using ProGuard for optimization, add specific lines to your configuration file to avoid warnings related to the required libraries.\u003c/p\u003e\n"],["\u003cp\u003eProGuard supports a minimum Android API level of 23 for Driver SDK integration.\u003c/p\u003e\n"],["\u003cp\u003eFor subsequent steps, proceed to creating authentication tokens for securing communication.\u003c/p\u003e\n"]]],[],null,["# Declare dependencies\n\nTo ensure smooth communication between the Driver SDK and Fleet Engine, you need\nto declare the necessary dependencies. This involves adding\nspecific libraries to your project and, if using ProGuard, updating your\nconfiguration file.\n\nUpdate ProGuard configuration\n-----------------------------\n\nIf you use [ProGuard](https://www.guardsquare.com/en/products/proguard) to optimize your builds, you may need to add the\nfollowing lines to your ProGuard configuration file: \n\n -dontwarn com.google.**\n -dontwarn io.grpc.**\n -dontwarn okio.**\n\nProGuard supports the minimum Android API level 23.\n\nWhat's next\n-----------\n\n[Create authentication tokens](/maps/documentation/mobility/driver-sdk/scheduled/android/authenticate)"]]