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()); 
    }
Developer technologies .NET Xamarin
{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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.