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之后也解決了周叮,完全不知道原理抬旺。