java.lang.NoSuchMethodError: No static method getFont

安卓studio升级3.0.1以后,出现以下异常:

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)


原因是: RecyclerView版本和AppCompat版本不一致,改为一致就好了

compile 'com.android.support:recyclerview-v7:27.0.2'

你可能感兴趣的:(Exception)