即时崩溃-没有静态方法getFont

时间:2018-06-21 19:16:42

标签: android android-layout android-studio android-fragments android-recyclerview

最近我已将RecyclerView添加到我的Android应用程序中(使用带有Java的Android Studio),我看不到它的相关性,但是每次我现在运行我的应用程序时,它都会立即崩溃,并出现以下错误。为了清楚起见,我的主要活动完全没有改变。所以真的很混乱。我真的很感谢任何帮助的尝试。

E/AndroidRuntime: FATAL EXCEPTION: main
                  Process: services.coder.appname, PID: 21535
                  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/services.coder.appname-hdTFJAIptDXd75kuWxhozw==/split_lib_dependencies_apk.apk)
                      at android.support.v7.widget.TintTypedArray.getFont(TintTypedArray.java:119)
                      at android.support.v7.widget.AppCompatTextHelper.updateTypefaceAndStyle(AppCompatTextHelper.java:208)
                      at android.support.v7.widget.AppCompatTextHelper.loadFromAttributes(AppCompatTextHelper.java:110)
                      at android.support.v7.widget.AppCompatTextHelperV17.loadFromAttributes(AppCompatTextHelperV17.java:38)
                      at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:81)
                      at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:71)
                      at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:67)
                      at android.support.v7.widget.Toolbar.setTitle(Toolbar.java:753)
                      at android.support.v7.widget.ToolbarWidgetWrapper.setTitleInt(ToolbarWidgetWrapper.java:261)
                      at android.support.v7.widget.ToolbarWidgetWrapper.setWindowTitle(ToolbarWidgetWrapper.java:243)
                      at android.support.v7.widget.ActionBarOverlayLayout.setWindowTitle(ActionBarOverlayLayout.java:621)
                      at android.support.v7.app.AppCompatDelegateImplV9.onTitleChanged(AppCompatDelegateImplV9.java:631)
                      at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:328)
                      at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
                      at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
                      at services.appname.coder.MainActivity.onCreate(MainActivity.java:15)
                      at android.app.Activity.performCreate(Activity.java:7117)
                      at android.app.Activity.performCreate(Activity.java:7108)
                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1262)
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2867)
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3027)
                      at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
                      at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:101)
                      at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:73)
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1786)
                      at android.os.Handler.dispatchMessage(Handler.java:106)
                      at android.os.Looper.loop(Looper.java:164)
                      at android.app.ActivityThread.main(ActivityThread.java:6656)
                      at java.lang.reflect.Method.invoke(Native Method)
                      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)

0 个答案:

没有答案