最佳答案
您收到该错误的原因是 minSdkVersion 定义了您的应用程序有资格运行的最低版本。
minSdkVersion: An integer designating the minimum API Level required for the application to run. The Android system will prevent the user from installing the application if the system's API Level is lower than the value specified in this attribute. You should always declare this attribute.
您可以使用支持框架中的此方法来获取所有旧版本的字体:
ResourcesCompat.getFont(context, font_id)
https://developer.android.com/reference/android/support/v4/content/res/ResourcesCompat
关于java - 无法在 Android Studio 中使用 getFont,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51344535/