android - Xamarin 安卓 : Cannot resolve GoogleSignIn and GoogleSignInClient

标签 android xamarin google-api xamarin.android google-oauth

我无法在实现 Google Sign 时使用 GoogleSignIn(com.google.android.gms.auth.api.signin.GoogleSignIn) 和 GoogleSignInClient(com.google.android.gms.auth.api.signin.GoogleSignInClient)在带有 Xamarin Android 的 Visual Studio 中,我可以访问 App 中的其他类,例如:

com.google.android.gms.auth.api.signin.GoogleSignInAccount;
com.google.android.gms.auth.api.signin.GoogleSignInOptions;

这是我正在关注的指南:https://developers.google.com/identity/sign-in/android/sign-in

此外,我一直在寻找类似这篇文章的 Java 和其他 IDE 文章: Cannot resolve GoogleSignIn and GoogleSignInClient

但是,就我而言,问题出在带有 Visual Studio 的 Xamarin Android 中。

我尝试使用 nuget Xamarin.GooglePlayServices.Identity 的官方版本和初步版本:

enter image description here

然后,我在 GooglePlayServices 的正式版和初步版中尝试了所有 nutgets avaliables:

enter image description here

这是另一篇文章它在我的情况下不起作用,因为版本 Nutget 不可用:How do you integrate the new Google Sign-In on a Xamarin.Android app?

Xamarin.GooglePlayServices.Identity 29.0.0-beta1

最后,我也在 SDK 管理器中配置了 Google Repository Tool: enter image description here

最佳答案

安装包 Xamarin.GooglePlayServices.Auth 解决了我的问题。

关于android - Xamarin 安卓 : Cannot resolve GoogleSignIn and GoogleSignInClient,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56468727/

相关文章:

android - 在本地主机上 react native android 连接后端服务

c# - Xamarin Forms 无法创建 SQLite 数据库

android - 无法将类型 'Android.Support.V4.App.Fragment' 转换为 'Android.Gms.Maps.MapFragment'

node.js - ACCESS_TOKEN_SCOPE_INSUFFICIENT 403 请求的认证范围域不足

android - SecurityException - GoogleCertificatesRslt : not allowed

android - 将图像和文本上传到 MySQL (android)

Android Webview使后退按钮转到上一页

安卓VideoView : How do I validate an illegal character in my url?

android - MvvmCross Xamarin.Android FloatingActionButton 切换可见性

node.js - Google 电子表格 api 请求的身份验证范围不足