英文:
Cannot see Nearby.ExposureNotification package
问题
我已将 "nearby" 包添加到 build.gradle (module:app) 中,如下所示:
implementation 'com.google.android.gms:play-services-nearby'
然而,我正在尝试在我的应用程序中导入以下包,但我看不到它:
com.google.android.gms.nearby.exposurenotification
这是关于该包的谷歌开发者链接:
https://developers.google.com/android/reference/com/google/android/gms/nearby/exposurenotification/package-summary
如果你查看谷歌的这个存储库,你会发现他们在使用这个包:
https://github.com/google/exposure-notifications-android
我在他们的项目中探索了 nearby.Nearby 类,你会发现这个类有一个名为:
ExposureNotificationClient getExposureNotificationClient(Context c)
然而在我的应用程序的 Nearby 类中我也看不到这个方法。
我正在实现的 "nearby" 包的最新版本是 17.0.0。
英文:
I have added the nearby package to build.gradle (module:app) as the following:
implementation 'com.google.android.gms:play-services-nearby'
However, I am trying to import the following package in my app but I cannot see it:
com.google.android.gms.nearby.exposurenotification
Here is the link for the package on google develoepr:
https://developers.google.com/android/reference/com/google/android/gms/nearby/exposurenotification/package-summary
If you look to this repo by google, you can see that they are using this package:
https://github.com/google/exposure-notifications-android
I explore the nearby.Nearby class in their project you can see that this class has a method called:
ExposureNotificationClient getExposureNotificationClient(Context c)
which I also don't see in the Nearby class of my application
I am implementing the last version of nearby package which is 17.0.0
答案1
得分: 1
你在使用 Gradle 实现时不会看到这个包。因为这个包属于 EAP(“早期访问计划”)。所以你可以从以下链接复制这个库,然后粘贴到你的应用程序中:https://github.com/google/exposure-notifications-android/tree/master/app/libs
另外,可以查看这个问题以获取更多信息:https://github.com/google/exposure-notifications-android/issues/23
英文:
You won't see this package when implementing it from gradle. Because this package is an EAP ("early access program"). So you can copy this library and paste it to your application from the following link:
https://github.com/google/exposure-notifications-android/tree/master/app/libs
Also, have a look at this issue for more information:
https://github.com/google/exposure-notifications-android/issues/23
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论