开发者社区 问答 正文

android:layout_width="0dp"提示出错? 400 报错

android:layout_width="0dp"提示出错? 400 报错

suspicious size:this will make the view invisible;probably intended for layout_height

<fragment

    andrdoi:id="@+id/left_fragment"

    android:name="```"

    android:layout_width="0dp"

    android:layout_height="match_parent"

    android:layout_weight="1"

    />

展开
收起
爱吃鱼的程序员 2020-06-03 11:38:44 1073 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    外层须是LinearLayout吧######外层用的是LinearLayout,是按照《第一行代码》敲的######

    引用来自“vigiles”的评论

    外层须是LinearLayout吧
    LinearLayout还要指定orientation为vertical######回复 @vigiles : 刚刚把vertical删掉之后就没有提示错误了,谢谢=_=######<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=" http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_par...######说错了,是horizontal
    2020-06-03 11:39:02
    赞同 展开评论