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.m.testgoogle-2/base.apk:classes2.dex)
at android.support.v7.widget.TintTypedArray.getFont(TintTypedArray.java:119)
Android Studio升级3.0后 新建项目
开始:
compileSdkVersion 26
targetSdkVersion 26
compile 'com.android.support:support-v4:26.+'
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:recyclerview-v7:26.+'
compile 'com.android.support:design:26.+'
修改为
compileSdkVersion 27
targetSdkVersion 27
compile 'com.android.support:support-v4:27.+'
compile 'com.android.support:appcompat-v7:27.+'
compile 'com.android.support:recyclerview-v7:27.+'
compile 'com.android.support:design:27.+'
就解决了
依赖包冲突 clean rebuild之后也解决了,完全不知道原理。