-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android, .NET MAUI 9.0 Preview 5] When building with Visual Studio 17.11.0 Preview 2.1, Maui fails randomly to import the fonts, but still finishes building without errors. #23364
Comments
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! Open similar issues:
Closed similar issues:
|
Possibly related/duplicate #23268 |
I'm pretty sure this is related to the very unreliably working resizetizer on Android. Fonts are copied (for whatever reason) to The workaround is not to use resizetizer with fonts on Android, but rather copy them to the right location using MauiAsset, as follows:
|
This is happening in .NET 8.0 now also. It only happens on Debug mode, not Release for me. Something has changed. This only started in the last few weeks for me. Deleting bin and obj sometimes works. I have only had it happen ~5 times so I can't pin down what I'm doing if anything to trigger or fix it. But I am not in .NET 9.0 so it is certainly not a .NET 9.0 only issue. I am using
|
This started happening for me with the latest service release (8.0.90) at the time of writing, but only in Release mode. In Debug mode, fonts are loaded and displayed correctly on Android. It works fine with the previous release, so I had to roll back to an earlier version to create a release build for a client. In my particular case, it's not random, though, the fonts simply don't get included in the APK, the file is smaller than it should be and thus, the app only shows an "X" where a font icon should be and all other text is displayed with the default system font. |
We are seeing the same thing with SR9 @ewerspej and reverting is not a great option for us because it fixes other issues. The workaround above (thanks @janne-hmp!) seems to have worked though if you didn't try it. |
Not sure where MS is with fixing this, but my guess is that this results (along with many other similar issues on Android) from VS 2022 IDE launching design-time build exactly at the same time as when the user selects Rebuild command in VS, which leads to two same build processes running at the same time, causing random sharing violations. If you build the app with |
I'm glad the workaround works for you, I haven't tried that one yet. While workarounds are okay sometimes, this would be the kind that is easily forgotten. I just reverted to the previous version, which works just fine for me. |
The error is still here.
|
Description
Randomly, when building a Maui app with Visual Studio in Windows, the Android version of Maui fails randomly to import the fonts, but still builds apparently fine. Other versions (iOS, Windows) seem to always build fine. This can be especially problematic with release builds going to Google Play Store if the fonts are left out of the package without any errors or warnings.
Steps to Reproduce
Not sure, since it happens very randomly, but still consistently every now and then.
Link to public reproduction project repository
https://github.com/hyvanmielenpelit/GnollHack
Version with bug
9.0.0-preview.4.10690
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
Android 14
Did you find any workaround?
Delete obj and bin directories and hope that the fonts are included next time when building.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: