java.lang.IllegalStateException: ScrollView can host only one direct child

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Patrick Porter
, 1 year ago
ScrollView can host only one direct child
via Google Groups by Unknown author, 2 weeks ago
Only fullscreen activities can request orientation
via Google Groups by NYAM, 1 month ago
Only fullscreen activities can request orientation
via Google Groups by Ishroid, 1 month ago
via Stack Overflow by user3040968
, 1 year ago
ScrollView can host only one direct child
via GitHub by GoogleCodeExporter
, 1 year ago
The specified child already has a parent. You must call removeView() on the child's parent first.
java.lang.IllegalStateException: ScrollView can host only one direct child
at android.widget.ScrollView.addView(ScrollView.java:410)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:770)
at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
at com.example.android.justjava.MainActivity.onCreate(MainActivity.java:23)
at android.app.Activity.performCreate(Activity.java:5585)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)

Users with the same issue

Once, 7 months ago
2 times, 7 months ago
3 times, 11 months ago
Once, 1 year ago
4 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.