简体   繁体   English

java.lang.ClassCastException:android.view.AbsSavedState $ 1无法强制转换为android.widget.ScrollView $ SavedState

[英]java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.ScrollView$SavedState

I recently started getting following exception in our production app. 我最近开始在我们的生产应用程序中获得以下异常

{ "androidApiLevel": "28", "osBuild": "PQ2A.190405.003" } {“androidApiLevel”:“28”,“osBuild”:“PQ2A.190405.003”}

Device: Pixel 2 XL 设备:Pixel 2 XL

Any idea whats going on here? 有什么想法在这里发生?

java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.ScrollView$SavedState
    at android.widget.ScrollView.onRestoreInstanceState(ScrollView.java:1834)
    at android.view.View.dispatchRestoreInstanceState(View.java:18608)
    at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3821)
    at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3827)
    at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3827)
    at android.view.View.restoreHierarchyState(View.java:18586)
    at androidx.e.a.d.restoreViewState(Fragment.java:494)
    at androidx.e.a.j.a(FragmentManager.java:1486)
    at androidx.e.a.j.f(FragmentManager.java:1784)
    at androidx.e.a.j.a(FragmentManager.java:1852)
    at androidx.e.a.j.e(FragmentManager.java:3269)
    at androidx.e.a.j.q(FragmentManager.java:3229)
    at androidx.e.a.g.f(FragmentController.java:201)
    at androidx.e.a.e.onStart(FragmentActivity.java:620)
    at androidx.appcompat.app.d.onStart(AppCompatActivity.java:178)
    at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1391)
    at android.app.Activity.performStart(Activity.java:7165)
    at android.app.ActivityThread.handleStartActivity(ActivityThread.java:2975)
    at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:180)
    at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:165)
    at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:142)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6718)
    at java.lang.reflect.Method.invoke(Method.java:-2)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

There might be a case where you are using the same ID name for two elements. 可能存在两个元素使用相同ID名称的情况。

Recheck the ID which you have assigned to the scrollview with other views 使用其他视图重新检查已分配给scrollview的ID

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 android.view.AbsSavedState $ 1无法转换为android.widget.ScrollView $ SavedState - android.view.AbsSavedState$1 cannot be cast to android.widget.ScrollView$SavedState java.lang.ClassCastException: android.view.AbsSavedState$1 不能转换为 android.support.v7.widget.Toolbar$SavedState - java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.support.v7.widget.Toolbar$SavedState java.lang.ClassCastException:android.widget.LinearLayout无法转换为android.widget.ScrollView - java.lang.ClassCastException: android.widget.LinearLayout cannot be cast to android.widget.ScrollView java.lang.ClassCastException:android.widget.ScrollView无法强制转换为android.widget.TextView - java.lang.ClassCastException: android.widget.ScrollView cannot be cast to android.widget.TextView android.view.AbsSavedState$1 不能转换为 android.widget.CompoundButton$SavedState - android.view.AbsSavedState$1 cannot be cast to android.widget.CompoundButton$SavedState Android java.lang.classCastException:无法将Android.widget.ListView强制转换为android.view.Menu - Android java.lang.classCastException: Android.widget.ListView cannot be cast to android.view.Menu java.lang.ClassCastException:无法转换android.widget.TextView - java.lang.ClassCastException: android.widget.TextView cannot be cast java.lang.ClassCastException:android.view.ViewGroup$LayoutParams 不能转换为 android.widget.RelativeLayout$LayoutParams - java.lang.ClassCastException: android.view.ViewGroup$LayoutParams cannot be cast to android.widget.RelativeLayout$LayoutParams java.lang.ClassCastException:android.widget.Button无法转换为android.view.ViewGroup - java.lang.ClassCastException: android.widget.Button cannot be cast to android.view.ViewGroup java.lang.ClassCastException: android.view.ViewGroup$LayoutParams 不能转换为 android.widget.Gallery$LayoutParams - java.lang.ClassCastException: android.view.ViewGroup$LayoutParams cannot be cast to android.widget.Gallery$LayoutParams
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM