java.lang.ClassCastException:java.lang.String无法强制转换为java.lang.Object []

时间:2017-11-17 03:23:36

标签: android android-layout android-fragments android-nestedscrollview

这个错误是因为什么?

是因为android.support.v4.widget.NestedScrollView吗?

我真的使用android.support.v4.widget.NestedScrollView

这是如何引起的?如何解决?

java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Object[]
    at android.util.ArrayMap.allocArrays(ArrayMap.java:187)
    at android.util.ArrayMap.put(ArrayMap.java:459)
    at android.widget.RelativeLayout$DependencyGraph.findRoots(RelativeLayout.java:1942)
    at android.widget.RelativeLayout$DependencyGraph.getSortedViews(RelativeLayout.java:1871)
    at android.widget.RelativeLayout.sortChildren(RelativeLayout.java:402)
    at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:409)
    at android.view.View.measure(View.java:17938)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5746)
    at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1692)
    at android.widget.LinearLayout.measureVertical(LinearLayout.java:760)
    at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
    at android.view.View.measure(View.java:17938)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5746)
    at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1692)
    at android.widget.LinearLayout.measureVertical(LinearLayout.java:760)
    at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
    at android.view.View.measure(View.java:17938)
    at android.support.v4.widget.NestedScrollView.measureChildWithMargins(NestedScrollView.java:1446)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:465)
    at android.support.v4.widget.NestedScrollView.onMeasure(NestedScrollView.java:512)
    at android.view.View.measure(View.java:17938)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5746)
    at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1692)
    at android.widget.LinearLayout.measureVertical(LinearLayout.java:760)
    at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
    at android.view.View.measure(View.java:17938)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5746)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:465)
    at android.view.View.measure(View.java:17938)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5746)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:465)
    at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:139)
    at android.view.View.measure(View.java:17938)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5746)
    at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1692)
    at android.widget.LinearLayout.measureVertical(LinearLayout.java:760)
    at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
    at android.view.View.measure(View.java:17938)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5746)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:465)
    at android.view.View.measure(View.java:17938)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5746)
    at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1692)
    at android.widget.LinearLayout.measureVertical(LinearLayout.java:760)
    at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
    at android.view.View.measure(View.java:17938)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5746)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:465)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2791)
    at android.view.View.measure(View.java:17938)
    at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2462)
    at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1442)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1671)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1320)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6780)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:804)
    at android.view.Choreographer.doCallbacks(Choreographer.java:607)
    at android.view.Choreographer.doFrame(Choreographer.java:576)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:790)
    at android.os.Handler.handleCallback(Handler.java:815)
    at android.os.Handler.dispatchMessage(Handler.java:104)
    at android.os.Looper.loop(Looper.java:210)
    at android.app.ActivityThread.main(ActivityThread.java:5809)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1113)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:879)

0 个答案:

没有答案