我无法在实现 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
最佳答案
安装包 Xamarin.GooglePlayServices.Auth 解决了我的问题。
关于android - Xamarin 安卓 : Cannot resolve GoogleSignIn and GoogleSignInClient,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56468727/