1

I am using Android 4.2 and Eclipse indigo (3.7.0). I created a TableLayout with 6 rows. I wanted to add a TextView and an EditText in one row using the Graphic Layout in eclipse. No problem adding TextView but when I drag and drop EditText, the following error is displayed:

NOTE: This project contains Java compilation errors, which can cause rendering failures for custom views. Fix compilation problems first.
java.util.LinkedHashMap.eldest()Ljava/util/Map$Entry;

I have not written any code yet. Any code is generated by eclipse when I first created the project. The editText is included in the xml but the graphical layout has problem displaying it. I cut and paste the xml:

<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:stretchColumns="1,2,3" >

        <TableRow
            android:id="@+id/tableRow1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <EditText
                android:id="@+id/editText1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ems="10" >

                <requestFocus />
            </EditText>

        </TableRow>

        <TableRow
            android:id="@+id/tableRow2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >
        </TableRow>

        <TableRow
            android:id="@+id/tableRow3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >
        </TableRow>

        <TableRow
            android:id="@+id/tableRow4"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >
        </TableRow>

        <TableRow
            android:id="@+id/tableRow5"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >
        </TableRow>

        <TableRow
            android:id="@+id/tableRow6"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >
        </TableRow>

</TableLayout>
mwalsh
  • 11
  • 1
  • 4
  • You may not have written any code but Eclipse has, in the lower-left there is the tab "Graphical View", click the other tab (with your file's name) and edit this code into your question. – Sam Jul 18 '12 at 17:36
  • I cut and paste the code from xml view: – mwalsh Jul 18 '12 at 18:14
  • I encountered other problems so I ended up reinstalling android and eclipse. It is working now. Thanks for all responses. – mwalsh Jul 19 '12 at 15:45

2 Answers2

1

I tried your code in Eclipse and I don't have any issues. Everything works fine. Check if your SDK is up to date in the SDK Manager or if all your plugins are updated. Graphical Layout is user friendly, but not developer friendly.

cosmincalistru
  • 1,283
  • 9
  • 20
0

Try add this on your EditText:

android:inputType="textNoSuggestions"

Exception in loading layout: java.util.LinkedHashMap.eldest()Ljava/util/Map$Entry;

Community
  • 1
  • 1
tsuensiu
  • 186
  • 1
  • 9