I’m new to this site so please excuse my formatting issues. My problem is that I get this error in eclipse when I try to add a row to my xml TableLayout in the graphical layout tab of my xml document. My error is the following
Exception raised during rendering: / by zero
Exception details are logged in Window > Show View > Error Log
Here is my XML code. For some reason, even though a row is automatically added to the main.xml file, the graphical layout displays an error.
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/tableLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:padding="5dp"
android:stretchColumns="*" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</TableRow>
</TableLayout>
Let me know if you have any ideas about what I’m doing wrong, or if you need more info.
Please remove
android:stretchColumns="*"From TableLayout.Or Please provide any number instead of ‘*’ like
android:stretchColumns="2"