No orientation specified and the default is horizontal Android Error Solution

Solution for LinearLayout orientation error problem.

Usually there is error occurs when android developer trying to use Linear layout into android xml file in project. This error message look like this ” No orientation specified and the default is horizontal Android, This is a common source of bugs when children are added dynamically. ” So don’t worry guys you can solve this problem within a few seconds by adding android:orientation tag on linear layout tag. So here is the complete step by step tutorial for No orientation specified and the default is horizontal Android Error Solution.

No orientation specified and the default is horizontal Android

How to Solve No orientation specified and the default is horizontal Android Error.

Add android:orientation=”vertical” attribute in linear layout tag like i do in below example.

<LinearLayout
 android:id="@+id/content"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 android:orientation="vertical" >
 </LinearLayout>

 

Leave a Reply

Your email address will not be published. Required fields are marked *