java - 看不到 Nearby.ExposureNotification 包
问题描述
我已将附近的包添加到 build.gradle (module:app) 中,如下所示:
implementation 'com.google.android.gms:play-services-nearby'
但是,我试图在我的应用程序中导入以下包,但我看不到它:
com.google.android.gms.nearby.exposurenotification
这是 google develoepr 上的包链接: https ://developers.google.com/android/reference/com/google/android/gms/nearby/exposurenotification/package-summary
如果你通过谷歌查看这个 repo,你可以看到他们正在使用这个包: https ://github.com/google/exposure-notifications-android 我探索了他们项目中的 near.Nearby 类,你可以看到这个类有一个方法叫做:
ExposureNotificationClient getExposureNotificationClient(Context c)
我在我的应用程序的 Nearby 类中也没有看到
我正在实施附近软件包的最后一个版本,即17.0.0
解决方案
从 gradle 实现它时,你不会看到这个包。因为这个包是一个 EAP(“抢先体验计划”)。因此,您可以从以下链接复制此库并将其粘贴到您的应用程序: https ://github.com/google/exposure-notifications-android/tree/master/app/libs
另外,请查看此问题以获取更多信息: https ://github.com/google/exposure-notifications-android/issues/23
推荐阅读
- npm - 如何使用包裹显示我的 index.html?
- linux - shell脚本中的while循环验证
- amazon-web-services - 在自定义代码 aws lambda 层中需要依赖项
- typescript - 无法将发出的事件从子组件传递给父组件
- r - 我如何只grep字符串长度<= x的行?
- git - Git bash pull/push checker for repo to batch equivalent
- typescript - Jest TypeError:无法读取未定义的属性“绑定”
- javascript - 实现rest html前端PATCH
- oauth-2.0 - 谷歌操作没有 webhook 调用帐户取消链接
- c# - Razor 页面无法验证策略