azure mobile service not working on xamarin.android

对着背影说爱祢 提交于 2019-12-12 11:35:32

问题


I'm trying to implement Azure Mobile Services in my Xamarin.Forms app.

I'm following this link and it works on iOS but not on Android. It throws this exception:

MobileServiceInvalidOperationException - "The server did not provide a response with the expected content."

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

Any help?


回答1:


Your issue is tracked here, and seems to be because of the following:

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.

There seems to be a temporary work around here, by brendanzagaeski to in the call to new MobileServiceClient():

  • Either pass in an HttpClientHandler instance
  • Or pass in an instance of AndroidClientHandler

It seems like AndroidClientHandler is the one that works the most often.



来源:https://stackoverflow.com/questions/58210835/azure-mobile-service-not-working-on-xamarin-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!