我的应用程序在我点击按钮导航到主页活动时崩溃。之前它一直正常工作。我尝试在很长一段时间后构建该项目,现在出现了这个错误。以下是堆栈跟踪:
![Stacktrace](https://istack.dev59.com/ve28Y.webp)
02-05 07:22:53.134 20645-20645/com.fault.reporter D/InputTransport: Input channel constructed: fd=70 02-05 07:22:53.134 20645-20645/com.fault.reporter D/ViewRootImpl@83d1b0a[HomeActivity]: setView = DecorView@3fdbf7b[HomeActivity] touchMode=true 02-05 07:22:53.137 20645-20645/com.fault.reporter D/AndroidRuntime: Shutting down VM 02-05 07:22:53.137 20645-20645/com.fault.reporter E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.fault.reporter, PID: 20645
java.lang.NoSuchMethodError: No static method getDisplay(Landroid/view/View;)Landroid/view/Display; in class Landroid/support/v4/view/ViewCompat; or its super classes (declaration of 'android.support.v4.view.ViewCompat' appears in /data/data/com.fault.reporter/files/instant-run/dex/slice-com.android.support-support-v4-23.1.1_06456312a9f4ec02807847836689deefb3552449-classes.dex)
at android.support.v7.widget.RecyclerView.onAttachedToWindow(RecyclerView.java:2457)
at android.view.View.dispatchAttachedToWindow(View.java:16633)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3149)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3156)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3156)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3156)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3156)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3156)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3156)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3156)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1768)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1490)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7027)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:927)
at android.view.Choreographer.doCallbacks(Choreographer.java:702)
at android.view.Choreographer.doFrame(Choreographer.java:638)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:913)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6688)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)