java第18891行android

java第18891行android

本文介绍了View.java第18891行android.view.View.onRestoreInstanceState异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 crashlytics 中遇到了一些例外情况。但找不到文件或引起异常的原因。另外,我每次都会得到不同的行号。

I am getting some exceptions in crashlytics. but not able find the file or cause of an exception. Also, I am getting different line number every time.

我没有太多信息需要详细信息。

I don't have much information I am seeking for the details.

从crashlytics我得到了设备像这样的详细信息:

From crashlytics I get the device details like :

-三星SM-G950F-Android 8-View.java第18877行,View.java第18891行

-- Samsung SM-G950F -- Android 8 -- View.java line 18877, View.java line 18891

-Oppo R7plusf-Android 5-View.java第13790行

-- Oppo R7plusf -- Android 5 -- View.java line 13790

-华硕ASUS_X00LD-Android 8-View.java行17753

--Asus ASUS_X00LD -- Android 8 -- View.java line 17753

View.java行18891 android.view.View.on.RestoreInstanceState

Fatal Exception: java.lang.RuntimeException
Unable to start activity ComponentInfo{com.lendlease.plus/com.lendlease.plus.activity.ReceiptDetailActivity}: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.os.Bundle instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/ivReceipt. Make sure other views do not use the same id.
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2955)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3030)
android.app.ActivityThread.-wrap11 (Unknown Source)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1696)
android.os.Handler.dispatchMessage (Handler.java:105)
android.os.Looper.loop (Looper.java:164)
android.app.ActivityThread.main (ActivityThread.java:6938)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)

如果您遇到此类例外情况,否则可能会引起任何原因,请告诉我。

Please let me know if you face such an exception or you may know any cause for this.

谢谢!

推荐答案

您已阅读崩溃报告

该报告在您的 ReceiptDetailActivity 布局,您有两个包含相同ID的不同视图 ivReceipt

The report saying that in your ReceiptDetailActivity layout you have two different view containing same id ivReceipt

根据您的以下评论

解决方案不要使用相同的ID只需更改ID名称即可使用

Solution don't use same ID Just change the id name it will work

这篇关于View.java第18891行android.view.View.onRestoreInstanceState异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 20:00