靓仔丶落泪 2022-02-05 20:34 采纳率: 80%
浏览 108
已结题

linearlayout出现multiple root tags问题在哪呢就是找不到急死人

















 <LinearLayout
     android:layout_width="match_parent"
     android:background="#FFFFFF"
     android:layout_height="20dp">
 </LinearLayout>
 <!--- 以下第四栏 放文字 -->
<LinearLayout
     android:layout_width="match_parent"
     android:background="#FFFFFF"
     android:layout_height="wrap_content">
     <TextView
         android:layout_width="wrap_content"
         android:text="  温度"
         android:textColor="#99CCFF"
         android:textStyle="normal"
         android:freezesText="true"
         android:textSize="25dp"
         android:gravity="center_vertical"
         android:layout_marginLeft="175dp"
         android:layout_weight="1"
         android:layout_height="wrap_content">
     </TextView>
 </LinearLayout>
 <!--- 以下第五栏 放文字 数值 -->
 <LinearLayout
     android:layout_width="match_parent"
     android:background="#FFFFFF"
     android:layout_height="20dp">
 </LinearLayout>

 <LinearLayout
     android:layout_width="match_parent"
     android:background="#FFFFFF"
     android:layout_height="wrap_content">
     <TextView
         android:layout_width="wrap_content"
         android:text="25 ℃"
         android:textColor="#99CCFF"
         android:textStyle="normal"
         android:freezesText="true"
         android:textSize="25dp"
         android:gravity="center_vertical"
         android:layout_marginLeft="175dp"
         android:layout_weight="1"
         android:id="@+id/Txt_ 温度"
         android:layout_height="wrap_content">
     </TextView>
 </LinearLayout>
 <!--- 以下栏 留白 -->
 <LinearLayout
     android:layout_width="match_parent"
     android:background="#FFFFFF"
     android:layout_height="20dp">
 </LinearLayout>









img

  • 写回答

1条回答 默认 最新

  • 不会写代码的猴子 Android领域优质创作者 2022-02-06 21:03
    关注

    根layout只能有一个。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 3月7日
  • 已采纳回答 2月27日
  • 修改了问题 2月5日
  • 创建了问题 2月5日

悬赏问题

  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示