[英]How to use Google.Apis.Fitness.v1 in the xamarin forms project [closed]
I have an xamarin form project that uses the Google.Apis.Fitness.v1 package to access Google data.And I follow the document Getting Started with the REST API In the google console.
并参考文档Installed-applications中的控制台程序示例,并将其移植到我的 Android 项目MyDemo中。
但是运行的时候总是报错:
[错误] 致命的未处理异常:System.NotSupportedException:无法使用“https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&response_type=code&client_id=673611916665-qaif4a0u1blpklf9gjmt69atbckem4ot.apps.googleusercontent.com&redirect_uri =http%3A%2F%2F127.0.0.1%3A39617%2Fauthorize%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.activity.read" 进行授权。 有关详细信息,请参阅内部异常。 ---> System.ComponentModel.Win32Exception: 在 /Users/builder/jenkins/workspace/archive 中的 System.Diagnostics.Process.StartWithShellExecuteEx (System.Diagnostics.ProcessStartInfo startInfo) [0x000f6] 中找不到指定的文件 [mono-rt] -mono/2020-02/android/release/mcs/class/System/System.Diagnostics/Process.cs:616 [mono-rt] 在 System.Diagnostics.Process.Start () [0x00032] 在 /Users/builder/ jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/System/services/monitoring/system/diagnosticts/Process.cs:2001 [mono-rt] at (wrapper remoting-invoke-with -check) System.Diagnostics.Process.Start() [mono-rt] 在 System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x0001b] 在 /Users/builder/jenkins/workspace/archive-mono/ 2020-02/android/release/mcs/class/referencesource/System/services/monitoring/system/diagnosticts/Process.cs:2490 [mono-rt] 在 System.Diagnostics.Process.Start (System.String fileName, System.字符串参数)[0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/System/services/monitoring/system/diagnosticts/Process.cs:2473 [mono-rt] 在谷歌。 Apis.Auth.OAuth2.LocalServerCodeReceiver.OpenBrowser (System.String url) [0x00065] 在 C:\Apiary\2022-03-28.08-00-01\Src\Support\Google.Apis.Auth\OAuth2\LocalServerCodeReceiver.cs: 540 [mono-rt] at Google.Apis.Auth.OAuth2.LocalServerCodeReceiver.ReceiveCodeAsync (Google.Apis.Auth.OAuth2.Requests.AuthorizationCodeRequestUrl url, System.Threading.CancellationToken taskCancellationToken) [0x0004e] in C:\Apiary\2022- 03-28.08-00-01\Src\Support\Google.Apis.Auth\OAuth2\LocalServerCodeReceiver.cs:391 [mono-rt] --- 内部异常堆栈跟踪结束 ---
我想得到一些帮助。 任何帮助将不胜感激
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.