【问题标题】:Android studio font resource directory in sdk 26sdk 26中的Android studio字体资源目录
【发布时间】:2017-11-11 14:44:29
【问题描述】:

我在 Res 目录中创建了字体资源目录,但是如果我想创建文件 xml Android studio 看不到我 New > 字体资源文件,因为它写在官方指南中。https://developer.android.com/preview/features/fonts-in-xml.html

即使我手动插入 xml 文件也不接受标签 <font-family>

【问题讨论】:

  • 确保您的 resource typefont
  • 是的,它是字体资源,名称是字体
  • Note: As of Android Support Library 26.0-beta1, you must declare both sets of attributes to ensure your fonts load on devices running Android O or lower.
  • 添加我手动创建的xml图片
  • Android Studio 3.0 及更高版本了解字体资源。旧版本(例如,现在的 2.3.3)没有。

标签: android android-studio fonts


【解决方案1】:

使用 Android Studio 3.0 或更高版本同时更新你的 gradle,你的目标 sdk 版本、构建工具版本、编译 sdk 版本应为 26 或更高。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-05-06
    • 1970-01-01
    • 2014-01-22
    • 2017-08-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-15
    相关资源
    最近更新 更多