在 Xamarin.Android 项目中找不到错误 APT2260 资源字体

error APT2260 resource font not found in Xamarin.Android project

我正在尝试寻找 Calligraphy 的替代品,因为我必须将我的项目升级到 API 级别 29。我在新端口上没有任何运气,所以我正在按照建议尝试本机解决方案以下:

https://medium.com/@davidmigloz/migrating-custom-fonts-from-calligraphy-to-android-fonts-3b635fd945dc

https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml?authuser=1

https://devblogs.microsoft.com/xamarin/embedded-fonts-xamarin-forms/

https://johnthiriet.com/xamarin-android-custom-font/

不幸的是,我收到以下错误:

错误 APT2260:找不到资源 font/IndieFlower(又名 com.________)。

我按照有关将字体从 Assets 移动到 Resources/font 文件夹的说明进行操作,但我仍然遇到此错误。

看来字体名称必须全部小写!当文件位于 Assets 文件夹中时,不一定要这样,但显然当它们位于 Resource/font 中时,它们必须如此。