我ScrollView在Android版式中使用它,但显示
IllegalStateException "Scrollview can host only one direct child"
如何避免这种异常?
崩溃信息:
07-19 15:58:22.308 21372 21372 D AndroidRuntime: Shutting down VM
07-19 15:58:22.313 21372 21372 E AndroidRuntime: FATAL EXCEPTION: main
07-19 15:58:22.313 21372 21372 E AndroidRuntime: Process: com.languoguang.helloworld, PID: 21372
07-19 15:58:22.313 21372 21372 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.languoguang.helloworld/com.languoguang.helloworld.plugin_homeadd.activity.AddDeviceWifiSettingActivity}: android.view.InflateException: Binary XML file line #254: ScrollView can host only one direct child
07-19 15:58:22.313 21372 21372 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3190)
07-19 15:58:22.313 21372 21372 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3285)
07-19 15:58:22.313 21372 21372 E AndroidRuntime: at android.app.ActivityThread.-wrap12(Unknown Source:0)
07-19 15:58:22.313 21372 21372 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1887)
07-19 15:58:22.313 21372 21372 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:108)
07-19 15:58:22.313 21372 21372 E AndroidRuntime: at android.os.Looper.loop(Looper.java:166)
07-19 15:58:22.313 21372 21372 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7412)
07-19 15:58:22.313 21372 21372 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
07-19 15:58:22.313 21372 21372 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
07-19 15:58:22.313 21372 21372 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:926)
07-19 15:58:22.313 21372 21372 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #254: ScrollView can host only one
波斯汪
相关分类