Unresolved reference: Typeface findFromCache

Ivan Nikitin :

Typeface class contains a static findFromCache method: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/graphics/java/android/graphics/Typeface.java

I also see the method in IntelliJ in Typeface source code.

However, when I try to use it I get Unresolved reference: findFromCache error. My current API version is 28. Target API 26.

Why does it show an error when the method is present in the SDK?

Geno Chen :

This API has an "annotation" @hide, this means it is an undocumented / hidden API, which are prohibited to use since Android API 28.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=102611&siteId=1