zoukankan      html  css  js  c++  java
  • 错误: java.lang.RuntimeException: Binary XML file line #7: You must supply a layout_height attribute.

     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下运行的程序就会报上面那个错误。

  • 相关阅读:
    hdu 5101 Select
    hdu 5100 Chessboard
    cf B. I.O.U.
    cf C. Inna and Dima
    cf B. Inna and Nine
    cf C. Counting Kangaroos is Fun
    Radar Installation 贪心
    spfa模板
    Sequence
    棋盘问题
  • 原文地址:https://www.cnblogs.com/feitianlee/p/3976455.html
Copyright © 2011-2022 走看看