azure移动服务无法在xamarin.android上运行 [英] azure mobile service not working on xamarin.android
问题描述
我正在尝试在Xamarin.Forms应用程序中实现Azure移动服务.
I'm trying to implement Azure Mobile Services in my Xamarin.Forms app.
我正在关注此链接,它可以在iOS上使用,但不能在Android上使用. 它将引发此异常:
I'm following this link and it works on iOS but not on Android. It throws this exception:
MobileServiceInvalidOperationException-服务器未提供预期内容的响应."
MobileServiceInvalidOperationException - "The server did not provide a response with the expected content."
我尝试在HTTP和HTTPS之间切换,但无法正常工作. 它也可以在Android(本机)上运行,而不能在Xamarin.Android
I have tried switching between HTTP and HTTPS but could not get it working. It works on Android (native) as well, just not on Xamarin.Android
有帮助吗?
推荐答案
已跟踪您的问题此处,并且似乎是由于以下原因:
Your issue is tracked here, and seems to be because of the following:
我们今天不支持SDK中的.Net Core 2.1.不幸的是,我们今天没有解决方法,就像Ela所说,我们还没有针对.Net Core 2.1兼容性的新版本或其他SDK的ETA,因此,您唯一的解决方法是坚持使用.Net现在是Core 2.0.
we don't support .Net Core 2.1 in the SDK today. Unfortunately, we don't have a workaround today and like Ela said, the we don't have an ETA for a new release or other SDK to use for .Net Core 2.1 compatibility yet, so your only workaround is to stick with .Net Core 2.0 for now.
此处 a>,由brendanzagaeski调用新的MobileServiceClient():
There seems to be a temporary work around here, by brendanzagaeski to in the call to new MobileServiceClient():
- 传递HttpClientHandler实例
- 或传入一个AndroidClientHandler实例
AndroidClientHandler似乎是最常使用的软件.
It seems like AndroidClientHandler is the one that works the most often.
这篇关于azure移动服务无法在xamarin.android上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!