我正在尝试将滚动视图布局添加到此布局:

我收到这个错误。
ScrollView can host only one direct child
我怎么解决这个问题?
我正在尝试将滚动视图布局添加到此布局:

我收到这个错误。
ScrollView can host only one direct child
我怎么解决这个问题?
一个滚动视图不能在他里面包含一个孩子
错误的
<ScrollView>
   <LinearLayout>
       xxxxx
   </LinearLayout>
   <LinearLayout>
       xxxxx
   </LinearLayout>
<ScrollView>
对
<ScrollView>
  <LinearLayout>
   <LinearLayout>
       xxxxx
   </LinearLayout>
   <LinearLayout>
       xxxxx
   </LinearLayout>
  </LinearLayout>
<ScrollView>
只有一个直系子女。
您只能在 ScrollView 中添加一个视图。因此,在 ScrollView 和 LinearLayout(L1) 中添加一个 LinearLayout 说 L1 ,添加所有其他 Views 。