Custom Font in Android not working

Hello Fuse Community,

i have a bug in my App that appears when i start the Android Preview Mode.

When i include these lines of code without these lines of code it work

        <Font File="assets/Fonts/RobotoCondensed-Bold.ttf" ux:Global="Bold" />
        <Font File="assets/Fonts/RobotoCondensed-Regular.ttf" ux:Global="Regular" />
        <Font File="assets/Fonts/RobotoCondensed-Light.ttf" ux:Global="Light" />

then i get a Error message “Oops! Something went wrong here. Object reference was null. Please refer to the log for details.”
And the log shows the following:

[Pixel]: Uno.NullReferenceException: Object reference was null
   at Uno.Collections.List`1.AddRange(Uno.Collections.IEnumerable<T>)
   at Fuse.Internal.AndroidSystemFont.GetFallback(Uno.UX.FileSource)
   at Fuse.Internal.SystemFont.GetFallback(Uno.UX.FileSource)
   at Fuse.Font..ctor(Uno.UX.FileSource)
   at Outracks.Simulator.Runtime.TryInvokeExtension.TryInvoke(Uno.Reflection.IFunction,object,object[])
   at Outracks.Simulator.Runtime.NativeReflection.CallStatic(Outracks.Simulator.Bytecode.TypeName,Outracks.Simulator.Bytecode.TypeMemberName,object[])
   at Outracks.Simulator.Runtime.NativeReflection.Instantiate(Outracks.Simulator.Bytecode.TypeName,object[])
   at Outracks.Simulator.Runtime.ScopeClosure.Evaluate(Outracks.Simulator.Bytecode.Instantiate)
   at Outracks.Simulator.Bytecode.Expression.Match`1(Uno.Func<Outracks.Simulator.Bytecode.ReadVariable, T>,Uno.Func<Outracks.Simulator.Bytecode.Literal, T>,Uno.Func<Outracks.Simulator.Bytecode.Lambda, T>,Uno.Func<Outracks.Simulator.Bytecode.MethodGroup, T>,Uno.Func<Outracks.Simulator.Bytecode.IsType, T>,Uno.Func<Outracks.Simulator.Bytecode.LogicalOr, T>,Uno.Func<Outracks.Simulator.Bytecode.Instantiate, T>,Uno.Func<Outracks.Simulator.Bytecode.CallLambda, T>,Uno.Func<Outracks.Simulator.Bytecode.CallStaticMethod, T>,Uno.Func<Outracks.Simulator.Bytecode.CallDynamicMethod, T>,Uno.Func<Outracks.Simulator.Bytecode.ReadStaticField, T>,Uno.Func<Outracks.Simulator.Bytecode.ReadProperty, T>,Uno.Func<Outracks.Simulator.Bytecode.WriteProperty, T>,Uno.Func<Outracks.Simulator.Bytecode.AddEventHandler, T>,Uno.Func<Outracks.Simulator.Bytecode.RemoveEventHandler, T>)
   at Outracks.Simulator.Runtime.ScopeClosure.Evaluate(Outracks.Simulator.Bytecode.Expression)
   at Outracks.Simulator.Runtime.ScopeClosure.Evaluate(Outracks.Simulator.ImmutableList<Outracks.Simulator.Bytecode.Expression>)
   at Outracks.Simulator.Runtime.ScopeClosure.Evaluate(Outracks.Simulator.Bytecode.CallStaticMethod)
   at Outracks.Simulator.Bytecode.Expression.Match`1(Uno.Func<Outracks.Simulator.Bytecode.ReadVariable, T>,Uno.Func<Outracks.Simulator.Bytecode.Literal, T>,Uno.Func<Outracks.Simulator.Bytecode.Lambda, T>,Uno.Func<Outracks.Simulator.Bytecode.MethodGroup, T>,Uno.Func<Outracks.Simulator.Bytecode.IsType, T>,Uno.Func<Outracks.Simulator.Bytecode.LogicalOr, T>,Uno.Func<Outracks.Simulator.Bytecode.Instantiate, T>,Uno.Func<Outracks.Simulator.Bytecode.CallLambda, T>,Uno.Func<Outracks.Simulator.Bytecode.CallStaticMethod, T>,Uno.Func<Outracks.Simulator.Bytecode.CallDynamicMethod, T>,Uno.Func<Outracks.Simulator.Bytecode.ReadStaticField, T>,Uno.Func<Outracks.Simulator.Bytecode.ReadProperty, T>,Uno.Func<Outracks.Simulator.Bytecode.WriteProperty, T>,Uno.Func<Outracks.Simulator.Bytecode.AddEventHandler, T>,Uno.Func<Outracks.Simulator.Bytecode.RemoveEventHandler, T>)
   at Outracks.Simulator.Runtime.ScopeClosure.Evaluate(Outracks.Simulator.Bytecode.Expression)
   at Outracks.Simulator.Runtime.ScopeClosure.Execute(Outracks.Simulator.Bytecode.Lambda,object[])
   at Outracks.Simulator.Runtime.LambdaClosure.Func(object)
   at Outracks.Simulator.Runtime.LambdaClosure.Action(object)
   at Outracks.Simulator.Runtime.ScopeClosure.Execute(object,object[])
   at Outracks.Simulator.Runtime.ScopeClosure.Evaluate(Outracks.Simulator.Bytecode.CallLambda)
   at Outracks.Simulator.Bytecode.Expression.Match`1(Uno.Func<Outracks.Simulator.Bytecode.ReadVariable, T>,Uno.Func<Outracks.Simulator.Bytecode.Literal, T>,Uno.Func<Outracks.Simulator.Bytecode.Lambda, T>,Uno.Func<Outracks.Simulator.Bytecode.MethodGroup, T>,Uno.Func<Outracks.Simulator.Bytecode.IsType, T>,Uno.Func<Outracks.Simulator.Bytecode.LogicalOr, T>,Uno.Func<Outracks.Simulator.Bytecode.Instantiate, T>,Uno.Func<Outracks.Simulator.Bytecode.CallLambda, T>,Uno.Func<Outracks.Simulator.Bytecode.CallStaticMethod, T>,Uno.Func<Outracks.Simulator.Bytecode.CallDynamicMethod, T>,Uno.Func<Outracks.Simulator.Bytecode.ReadStaticField, T>,Uno.Func<Outracks.Simulator.Bytecode.ReadProperty, T>,Uno.Func<Outracks.Simulator.Bytecode.WriteProperty, T>,Uno.Func<Outracks.Simulator.Bytecode.AddEventHandler, T>,Uno.Func<Outracks.Simulator.Bytecode.RemoveEventHandler, T>)
   at Outracks.Simulator.Runtime.ScopeClosure.Evaluate(Outracks.Simulator.Bytecode.Expression)
   at Outracks.Simulator.Runtime.ScopeClosure.Execute(Uno.Collections.IEnumerable<Outracks.Simulator.Bytecode.Statement>)
   at Outracks.Simulator.Runtime.ScopeClosure.Execute(Outracks.Simulator.Bytecode.Lambda,object[])
   at Outracks.Simulator.Client.VirtualMachine.Execute(Outracks.Simulator.Runtime.IReflection,Outracks.Simulator.Bytecode.Lambda,object[])
   at Outracks.Simulator.Client.Reifying.OnEnterState()
   at Outracks.Simulator.Client.Application.SetState(Outracks.Simulator.Client.State)
   at Outracks.Simulator.Client.Application.OnUpdate()
   at Fuse.App.OnTick(object,Uno.Platform.TimerEventArgs)
   at Uno.Platform.Display.OnTick(Uno.Platform.TimerEventArgs)
   at Uno.Platform.AndroidDisplay.OnFrameCallback(double,double)

i use fuse version 1.2.1 and MacOS 10.12.6

What is the target device that you are running the Android preview on? What OS version does it have?

Hey Uldis,

i use a Google Pixel with Android 8.0

Oh, alright. It is a known issue with Android 8 that has been fixed internally. Expect the fix to ship with a future release of Fuse and watch the change log.

Hello Uldis,
thanks for the reply. Then i wait for the next release of fuse.

Hey Uldis,

i tested this with the new 1.3.0 version and it is working fine.