How to solve this error?

钢 屈 371 Reputation points
2021-03-18T02:04:13.657+00:00

my code error is

Java.Lang.RuntimeException
Message=Font asset not found FontAwesome5Regular.otf

the error be in code LoadApplication(new App());

protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);

        Xamarin.Essentials.Platform.Init(this, savedInstanceState);
        global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
        LoadApplication(new App()); 
    }
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,325 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Hemalatha Marikumar 36 Reputation points
    2021-03-18T05:49:40.483+00:00

    Hi @钢 屈 ,

    Can you make sure whether you have added otf file to the Assets folder of the android project in Xamarin.Forms ?. If then, please ensure whether it has Build Action as Android Assets

    79023-project.png

    1 person found this answer helpful.
    0 comments No comments