Xamarin linking SDK and UserAssemblies: Error inflating class android.support.v7.widget.FitWindowsFrameLayout

前端 未结 4 1833
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-04 07:24

My app is working without linking. It works fine also when I choose Sdk Assemblies only. It works fine in debug mode as well but it start failing if I choose linking SDk and Use

4条回答
  •  无人共我
    2021-02-04 08:20

    It's stripped by the linker so you can "trick it " and simulate a false usage like this :

    static bool falseflag = false;
    static LinkerPleaseInclude()
    {
        if (falseflag)
        {
            var ignore = new FitWindowsFrameLayout(Application.Context);
        }
    }
    

    This is available in the Xamarin documentation too : https://developer.xamarin.com/guides/android/advanced_topics/linking/

提交回复
热议问题