I’m using eclipse and it keeps putting out the error message
txt cannot be resolved or is not a field
And I have this xml
<EditText
android:id="@+id/txt"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
I have this in the java file
setContentView(R.layout.test);
txt = (EditText) findViewById(R.id.txt);
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?
Any help appriciated
Try cleaning and rebuilding your project; sometimes the builder just gets confused.