android - Xamarin 安卓 : Cannot resolve GoogleSignIn

我无法在实现 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 的官方版本和初步版本:

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

这是另一篇文章它在我的情况下不起作用,因为版本 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:

最佳答案

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

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

相关文章:

amazon-web-services - 对于不支持发件人 ID 的国家/地区,AWS SNS S

firebase - 如何通过 FlatList 将键传递到它的 renderItem 中?

angular - 找不到 "src/assets"文件夹中的 JSON 文件

powerbi - 在 Power BI 中正确显示持续时间和格式

ionic-framework - ionic 应用程序上的 Youtube iframe 生成播放

python - 使用 win32com.client 列出可用的消息属性

performance - LINQ AsNoTracking 运行缓慢

sql-server - 连接到 SharePoint 服务器的 SQL 服务器

c# - 如何在另一个类中获取单例实例

ios - 如何在我的 flutter 应用程序中添加连续移动的背景?