java.lang.NoSuchMethodError: No static method getFont

Android Studio 3.0中,在AlertDialog弹窗时报出了如下问题:

java.lang.NoSuchMethodError: No static method getFont(Landroid/content/Context;ILandroid/util/TypedValue;ILandroid/widget/TextView;)Landroid/graphics/Typeface;
 in class Landroid/support/v4/content/res/ResourcesCompat; or its super classes (declaration of 'android.support.v4.content.res.ResourcesCompat' appears in /data/app/com.ik.githubbrowser-YvwoGrxR8QaUEZ3IEqFVLQ==/split_lib_dependencies_apk.apk)

解决方法:

compileSdkVersion 27
buildToolsVersion '27.0.0'


implementation 'com.android.support:support-v4:27.0.0'
implementation 'com.android.support:appcompat-v7:27.0.0'
implementation 'com.android.support:recyclerview-v7:27.0.0'
implementation 'com.android.support:design:27.0.0'

你可能感兴趣的:(java.lang.NoSuchMethodError: No static method getFont)