2015-10-20 107 views
1

我试图让Google Cloud Messaging在Visual Studio 2012中的Xamarin Forms Android应用程序中工作,并且GoogleApiAvailability.Instance.IsGooglePlayServicesAvailable(this)调用返回了错误代码1(Missing Service)。我确定已安装NuGet软件包(否则命名空间不可用),并且Android SDK管理器安装了Google Play服务。Xamarin Google Play服务缺失?

我还需要做些什么才能使服务可用?

编辑10/20下午1时34

IsGooglePlayServicesAvailable()返回时我调试应用在USB设备上的成功代码

回答

2

我的问题是,我试图使用来模拟器与Android SDK,而不是Xamarin Android Player https://xamarin.com/android-player

请记住,你还需要安装谷歌Play商店应用和更新它,如果你需要使用谷歌播放服务https://university.xamarin.com/resources/how-to-install-google-play-on-android-emulator

+0

@约翰罗素我也面临着同样的问题。 Xamarin中出现MissingMethodException。我正在使用设备,但仍然得到相同的异常。你能不能让我知道我该如何解决这个问题? –

+0

@IngridCooper您确定Google Play已更新吗? (Xamarin大学链接的第8步) –

+0

@John Russo是的,我查看了Google Play商店和Google Play服务。我的Google Play商店版本为5.10.30,Google Play服务为8.3.01 –