靓仔丶落泪 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 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算