error: id cannot be resolved or is not a field
<p>i have created these button but getting the error of "error: id cannot be resolved or is not a field" in every line of(// buttons) and "error: layour cannot be resolved or is not a field" of (r.layou.main) hwever dont see any errors my layout keypad.xml</p>

<p>keypad.Java</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);


        //Buttons
        one= (Button) findViewById(R.id.keypad_1);
        two= (Button) findViewById(R.id.keypad_2);
        three= (Button) findViewById(R.id.keypad_3);
        four= (Button) findViewById(R.id.keypad_4);
        five = (Button) findViewById(R.id.keypad_5);
        six= (Button) findViewById(R.id.keypad_6);
        seven = (Button) findViewById(R.id.keypad_7);
        eight = (Button) findViewById(R.id.keypad_8);
        nine = (Button) findViewById(R.id.keypad_9);
        minus = (Button) findViewById(R.id.keypad_subtract);
        hash = (Button) findViewById(R.id.keypad_hash);
</code></pre>

<p>keypad.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" &gt;

&lt;TextView
        android:id="@+id/Title"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15dp"
        android:textSize="45sp"&gt;
 &lt;/TextView&gt;

&lt;TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/keypad"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="*" &gt;

        //setting up keypad buttons one, two and three in one row
&lt;TableRow&gt;
&lt;Button android:id="@+id/keypad_1"
android:text="@string/keypad_1" &gt;
&lt;/Button&gt;
&lt;Button android:id="@+id/keypad_2"
android:text="@string/keypad_2" &gt;
&lt;/Button&gt;
&lt;Button android:id="@+id/keypad_3"
android:text="@string/keypad_3" &gt;
&lt;/Button&gt;
&lt;/TableRow&gt;
        //setting up keypad buttons 4,5 and 6 in second row
&lt;TableRow&gt;
&lt;Button android:id="@+id/keypad_4"
android:text="@string/keypad_4" &gt;
&lt;/Button&gt;
&lt;Button android:id="@+id/keypad_5"
android:text="@string/keypad_5" &gt;
&lt;/Button&gt;
&lt;Button android:id="@+id/keypad_6"
android:text="@string/keypad_6" &gt;
&lt;/Button&gt;
&lt;/TableRow&gt;

        //setting up keypad buttons 7,8 and 9 in third row
&lt;TableRow&gt;
&lt;Button android:id="@+id/keypad_7"
android:text="@string/keypad_7" &gt;
&lt;/Button&gt;
&lt;Button android:id="@+id/keypad_8"
android:text="@string/keypad_8" &gt;
&lt;/Button&gt;
&lt;Button android:id="@+id/keypad_9"
android:text="@string/keypad_9" &gt;
&lt;/Button&gt;
&lt;/TableRow&gt;
        //setting up keypad buttons del,0,# and - in forth row
&lt;TableRow&gt;
    &lt;Button android:id="@+id/delete"
android:text="@string/keypad_DEL" &gt;
&lt;/Button&gt;
&lt;Button android:id="@+id/keypad_0"
android:text="@string/keypad_0" &gt;
&lt;/Button&gt;
&lt;Button android:id="@+id/keypad_hash"
android:text="@string/keypad_#" &gt;
&lt;/Button&gt;
&lt;Button android:id="@+id/keypad_subtract"
android:text="@string/keypad_-" &gt;
&lt;/Button&gt;
&lt;/TableRow&gt;
&lt;/TableLayout&gt;

    &lt;TextView
        android:id="@+id/incorrect"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/incorrect" /&gt;
&lt;/LinearLayout&gt;
</code></pre>
