[英]Xamarin Android: Cannot resolve GoogleSignIn and GoogleSignInClient
在 Visual 中實現 Google 登錄時,我無法使用 GoogleSignIn(com.google.android.gms.auth.api.signin.GoogleSignIn) 和 GoogleSignInClient(com.google.android.gms.auth.api.signin.GoogleSignInClient) Studio with Xamarin Android 而我可以訪問 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 中尋找類似的帖子,例如這篇帖子: 無法解析 GoogleSignIn 和 GoogleSignInClient
但是,就我而言,問題出在 Xamarin Android 和 Visual Studio 中。
我嘗試使用 nuget Xamarin.GooglePlayServices.Identity 的官方和初步版本:
然后,我嘗試在 GooglePlayServices 的官方和初步版本中使用所有 nutgets avaliables:
這是另一篇文章它在我的情況下不起作用,因為版本 Nutget 不可用: 如何在 Xamarin.Android 應用程序上集成新的 Google 登錄?
Xamarin.GooglePlayServices.Identity 29.0.0-beta1
安裝 package Xamarin.GooglePlayServices.Auth 為我解決了這個問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.