我正在尝试使用 Microsoft.Identity.Client v1.1.0-preview
来通过Microsoft认证用户。当我执行 App.IdentityClientApp.AcquireTokenAsync
时,即使我在其周围加上了try/catch,它仍会终止应用程序。
Android设备日志显示:
Info 6756 MonoDroid System.MissingMethodException:
Method 'Android.Support.CustomTabs.CustomTabsIntent.LaunchUrl' not found.
at Android.App.Activity.n_OnResume (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <e975227ac8644a30bb0866117325de0d>:0
at (wrapper dynamic-method) System.Object:40d0e467-e2e5-447f-a0b5-87cb60ce49a7 (intptr,intptr)
如果您只尝试使用Release模式进行构建,它将无法完成。输出窗口中会显示类似的错误。
Mono.Linker.MarkException:
Error processing method: 'System.Void Microsoft.Identity.Client.AuthenticationActivity::OnResume()' in assembly:
'Microsoft.Identity.Client.dll' ---> Mono.Cecil.ResolutionException:
Failed to resolve System.Void
Android.Support.CustomTabs.CustomTabsIntent::LaunchUrl(Android.App.Activity,Android.Net.Uri)
有人知道他们是否已经放弃了这个代码,或者更好的是,有没有想法让它工作?它以前适用于iOS,但现在即使在登录过程完成后也存在一些问题。
microsoft.identity.client.BrowserTabActivity
添加到清单文件中?这可能会导致应用程序终止。 - cvanbeek