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'
compile 'com.android.support:support-v4:27.0.0'
compile 'com.android.support:appcompat-v7:27.0.0'
compile 'com.android.support:recyclerview-v7:27.0.0'
compile 'com.android.support:design:27.0.0'
上一篇:一个tomcat部署俩个java web项目


下一篇:OpenMP实现生产者消费者模型