1

我正在尝试将 Google Play Services 组件添加到我的 Xamarin 应用程序,因为我需要将 google maps api 集成到应用程序中。当我尝试在组件中搜索 Google Play 服务时,我找不到 Google Play 服务。我看到了其他组件,例如 Google Play 服务-广告或 Google Play 服务-应用索引,但没有看到 Google Play 服务。

我在 sdk manager 中安装了 Google play services 客户端:

在此处输入图像描述

该应用程序所针对的最低 api 级别为 19 级。我仍然找不到 Google Play 服务。这是所有结果的屏幕截图: 在此处输入图像描述

编辑

https://forums.xamarin.com/discussion/54499/google-play-services-v27-migration

根据上述网站 google play services-All 不再存在,现在它们是单独的包。所以现在我必须安装 Google Play Services-Maps。

4

1 回答 1

3

您可以使用 NuGet 将Google Play 服务地图下载到您的项目中。

https://www.nuget.org/packages/Xamarin.GooglePlayServices.Maps/

或者您可以从组件商店下载组件

https://components.xamarin.com/view/googleplayservices-maps

Google Play 服务库在某一时刻太大了,谷歌决定将关注点分成一个较小的包,原因有很多,例如太快达到 64K 引用限制,即使您只为您的应用程序使用了一小部分 API。

您可以在此处阅读有关此主题的概述指南:

https://developers.google.com/android/guides/overview

于 2016-10-06T21:06:58.737 回答