Open BrundhaVelusamy opened 2 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
MauiFont
not usable if added in MauiLibrary
(#21771), similarity score: 0.75Note: You can give me feedback by thumbs upping or thumbs downing this comment.
I can repro this issue at Android platform on the latest 17.11.0 Preview 6.0 (8.0.71 & 8.0.70).
Also here to confirm the issue on the latest MAUI, compiled against net8.0-android34.0
.
When debugging the provided MauiSampleApplication solution on Android, I also see output messages about the fonts (not just Maui Material Assets.ttf
but also OpenSans-Regular.ttf
).
Messages in the output window:
Java.Lang.RuntimeException: Font asset not found /data/user/0/com.companyname.mauisampleapplication/cache/Maui Material Assets.ttf
And:
Java.Lang.RuntimeException: Font asset not found OpenSans-Regular.ttf
But the app just runs and shows the correct fonts. Also the release version seems to work without crashing.
My issue is, that we are using a 3rd party control (via a nuget package) that uses an embedded font.
Debug works, but the release version crashes (on some Android devices, not all) with the same messages as above, only then as fatal exceptions:
Abort message: '[ERROR] FATAL UNHANDLED EXCEPTION: Java.Lang.RuntimeException: Font asset not found /data/user/0/<ApplicationId>/cache/Maui Material Assets.ttf
and:
Abort message: '[ERROR] FATAL UNHANDLED EXCEPTION: Java.Lang.RuntimeException: Font asset not found OpenSansRegular
So our issue is: using a nuget package that contains an embedded font crashes the release version of the app on some Android devices. The app starts up correct, but then whenever the fonts are being used, the app crashes.
Please provide a high priority for the resolution of this issue.
Relevant issue: https://github.com/dotnet/maui/issues/19804
Description
Description:
When registering a custom font as an embedded resource in a MAUI project, the following error appears in the output window when deploying on Android:
Reference sample: MauiSampleApplication.zip
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
8.0.71 SR7.1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response