java.lang.RuntimeException: Binary XML file line #7: You must supply a layout_height attribute.

 

java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x1

 这两个错误有可能是你指定了高度,但是在对应的dpi下没有声明这个dimen高度导致的错误。

 

<RelativeLayout

        android:layout_width="match_parent"

        android:layout_height="@dimen/titlebar_height" >

这个,你在xhdpi下定义了:

<dimen name="titlebar_height">50dp</dimen>

 

但是hdpi下没有,那么在hdpi下运行的程序就会报上面那个错误。

相关文章:

  • 2022-12-23
  • 2021-04-18
  • 2021-08-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-18
  • 2021-12-29
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
相关资源
相似解决方案