如何在 xamarin 上使用 android sdk 17 实现 google play 服务 [英] How to implement google play services using android sdk 17 on xamarin

查看:37
本文介绍了如何在 xamarin 上使用 android sdk 17 实现 google play 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用

  • 解压缩它,并在您的项目中引用下载的 DLL.
  • 像这样使用它:http://components.xamarin.com/gettingstarted/googleplayservices12
  • I have been trying to implement Google Play services using the steps in https://github.com/xamarin/monodroid-samples/tree/master/MapsAndLocationDemo_v2 and https://github.com/xamarin/monodroid-samples/tree/master/GooglePlayServices

    android update project -p "path to project" -t 4 worked

    ant debug works, updated project.properties, add Api key

    However on build in Xamarin studio 4.0.3 on Mac get this.using Xamarin android 4.6. what package is missing. any advice appreciated. am referencing Mono.android,support.v4

    /Users/TheCall/MapView/Components/googleplayservices-9.0/samples/GooglePlayServicesApp/GooglePlayServicesApp/obj/Debug/android/src/mono/com/google/android/gms/appstate/OnSignOutCompleteListenerImplementor.java(34,34): 
    Error: package com.google.android.gms.appstate does not exist 
    
    com.google.android.gms.appstate.OnSignOutCompleteListener (GooglePlayServicesApp)
    

    解决方案

    I suggest that you should use Google Play Services from http://components.xamarin.com/.

    Steps:

    1. Check your Google Play Services API in Android SDK Manager. If it's not rev. 12, update it. If thats not possible then check your revision, and find the appropirate component from Xamarin. They support rev. 9, rev. 10, and rev. 12. If you want to support older devices, download the Froyo version.

    2. Download this component if you are updated to rev. 12: http://components.xamarin.com/view/googleplayservices12/

    3. Unzip it, and reference the downloaded DLL in your project.
    4. Use it like this: http://components.xamarin.com/gettingstarted/googleplayservices12

    这篇关于如何在 xamarin 上使用 android sdk 17 实现 google play 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆