public ShowSearchBarRenderer(Context context) : base(context){}希望能回答您问题的第二部分.Today I updated to Xamarin.Forms 2.5.0 and saw, that I get the following warnings:From the Android sub-project:How can I get the local context instead of Forms.Context? Is the Android Context meant?From the custom renderer:In my ButtonRenderer I only have the OnElementChanged() method, so what should I change here? Simply add a ButtonRenderer(Context) constructor? I still get the warning, if I do this in my platform renderer class. Does anyone have an example? The official documentation doesn't mention it and Google also doesn't bring some useful results, except the open source code of ButtonRenderer. This change also concerns many other renderer classes.Does anyone had experienced other changes, which brakes plugins and so on?PS: Also I didn't found out, when Device.Windows was deprecated. Now I replaced it with Device.UWP. 解决方案 I had this same issue for a SearchBarRenderer and all I needed to do to fix it was add a constructor like so:public ShowSearchBarRenderer(Context context) : base(context){}Hope that answers the second part of your question. 这篇关于Xamarin.Forms 2.5.0 和上下文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!