Apps Cannot access variables from main.xml


Hello, I'm new to Android programming. I have a program that looks like this:
Here is the main java block:

public class MyAndroid extends Activity {
private EditText input1;

/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
mContext = this;


input1 = (EditText) findViewById(;


This is what my main.xml file looks like:

<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout android:id="@+id/widget45"
android:layout_width="fill_parent" android:layout_height="fill_parent"

<EditText android:id="@+id/input1" android:layout_width="160px"
android:layout_height="wrap_content" android:textSize="18sp"

android:numeric = "decimal|signed"
android:layout_x="8px" android:layout_y="13px">


However, I'm getting an error message: cannot be resolved. Why can't I access 'input1' from main.xml?
I've looked around on the web and haven't found this answer.
Clean your projects and recompile, sometime Eclipse don't generate the link correctly.
You can check also the import, if is there "import android.R;" delete it.