findViewById(R.id. finding nothing
<p>I'm using eclipse and it keeps putting out the error message</p>

<blockquote>
  <p>txt cannot be resolved or is not a field</p>
</blockquote>

<p>And I have this xml</p>

<pre><code> &lt;EditText
     android:id="@+id/txt"
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
 /&gt;
</code></pre>

<p>I have this in the java file</p>

<pre><code>    setContentView(R.layout.test);
    txt = (EditText) findViewById(R.id.txt);
</code></pre>

<p>and it is locating test fine, but not txt, actually if I change test to anything and then add something in that xml file the next line is not registering the id! Is something wrong with eclipse or just my programming?</p>

<p>Any help appriciated</p>
