我有带有 ActionBarScherlock 的应用程序,我使用 ACRA。我收到一些用户的崩溃报告,错误如下:
"java.lang.RuntimeException: Binary XML file line #20: You must supply a layout_height attribute.
at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:491)
at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:3602)
at android.view.ViewGroup$LayoutParams.<init>(ViewGroup.java:3554)
at android.widget.AbsListView$LayoutParams.<init>(AbsListView.java:4322)
at android.widget.AbsListView.generateLayoutParams(AbsListView.java:4116)
at android.widget.AbsListView.generateLayoutParams(AbsListView.java:74)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:332)
at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
at android.webkit.WebTextView$AutoCompleteAdapter.getView(WebTextView.java:650)
at android.widget.AbsListView.obtainView(AbsListView.java:1430)
at android.widget.AutoCompleteTextView$DropDownListView.obtainView(AutoCompleteTextView.java:1548)
at android.widget.ListView.measureHeightOfChildren(ListView.java:1216)
at android.widget.AutoCompleteTextView.buildDropDown(AutoCompleteTextView.java:1376)
at android.widget.AutoCompleteTextView.showDropDown(AutoCompleteTextView.java:1140)
at android.widget.AutoCompleteTextView.updateDropDownForFilter(AutoCompleteTextView.java:1022)
at android.widget.AutoCompleteTextView.onFilterComplete(AutoCompleteTextView.java:1005)
at android.widget.Filter$ResultsHandler.handleMessage(Filter.java:285)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3717)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
at dalvik.system.NativeStart.main(Native Method)"
当然我试过google它,发现它很可能是由ActionBarScherlock引起的(我注意到遇到这个错误的每个用户都使用android 2.3.*)但还没有找到解决方案。我无法在我自己的 2.3.* 设备上重现此错误,这有点令人不安...
那么,是什么导致了这个错误呢?