1

我想將Google Play服務組件添加到Xamarin應用程序中,因爲我需要將Google Maps API集成到應用程序中。當我嘗試在組件中搜索Google Play服務時,找不到Google Play服務。我看到其他組件,例如Google Play服務廣告或Google Play服務 - App Indexing,但沒有Google Play服務。在Xamarin Android項目的組件中找不到Google Play服務

我安裝在SDK管理器中的谷歌遊戲服務客戶:

enter image description here

和最小API級別的應用定位的是19級我仍然無法找到谷歌播放服務。這裏是所有的結果截圖: enter image description here

編輯

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

根據上述網站谷歌播放服務,所有不存在了,現在他們都單獨包裝。所以現在我必須安裝Google Play服務 - 地圖。

回答

3

您可以使用NuGet將Google Play Services Maps下載到您的項目中。

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

或者你可以從component store

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

的谷歌Play服務庫下載該組件是在一個點過大,谷歌決定的關切分成了更小的封裝許多原因(如打64K參考)的速度太快,即使您只爲應用程序使用了一小部分API。

你可以閱讀關於這一主題在這裏概述指南:

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

相關問題