我正在继续挖掘市场崩溃报告,并且遇到了另一个我无法理解的报告。堆栈跟踪:
java.lang.RuntimeException: Binary XML file line #17: You must supply a layout_height attribute.
at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:491)
at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:5319)
at android.view.ViewGroup$LayoutParams.<init>(ViewGroup.java:5271)
at android.widget.AbsListView$LayoutParams.<init>(AbsListView.java:6398)
at android.widget.AbsListView.generateLayoutParams(AbsListView.java:6035)
at android.widget.AbsListView.generateLayoutParams(AbsListView.java:96)
at android.view.LayoutInflater.inflate(LayoutInflater.java:477)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at com.android.internal.view.menu.ListMenuPresenter$MenuAdapter.getView(ListMenuPresenter.java:253)
at android.widget.AbsListView.obtainView(AbsListView.java:2212)
at android.widget.ListView.measureHeightOfChildren(ListView.java:1244)
at android.widget.ListView.onMeasure(ListView.java:1155)
at android.view.View.measure(View.java:12863)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2256)
at android.view.View.measure(View.java:12863)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1166)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2552)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4507)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
at dalvik.system.NativeStart.main(Native Method)
所以我被告知第17行的布局文件中缺少layout_height?但我不知道堆栈跟踪中的哪个布局文件。我将逐个浏览它们,看看我是否忘记了layout_height属性,但是我有很多这些属性,想看看我是否遗漏了一些明显的东西。