Getting error "id can not be resolved or is not a field"
<p>I am getting an error of "id can not be resolved or is not a field" in my private <code>View.OnClickListner onSave = new View.OnclickListner()</code>.</p>

<p>I am getting the error "Illegal modifier for parameter onSave; only final is permitted".</p>

<p>ID's in the <code>activity.java</code> file and layout file are also same.</p>

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

    Button save = (Button) findViewById(R.id.save);
    save.setOnClickListener(onSave);

    private View.OnClickListener onSave  = new View.OnClickListener() {
        public void onClick(View arg0) {
            // TODO Auto-generated method stub
            EditText name = (EditText)findViewById(R.id.name);
            EditText address = (EditText)findViewById(R.id.add);
</code></pre>

<p><strong>LAYOUT CODE</strong></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"
        &lt;TableLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:stretchColumns="1"&gt;

            &lt;TableRow
                &lt;TextView android:text="Name    :        " /&gt;
                &lt;EditText android:id="@+id/name"&gt;&lt;/EditText&gt;
             &gt;&lt;/TableRow&gt;

            &lt;TableRow
                &lt;TextView android:text="Address    :    "/&gt;
                &lt;EditText android:id="@+id/add"&lt;/EditText&gt;
            &gt;&lt;/TableRow&gt;

            &lt;Button
                android:id="@+id/button1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Save" /&gt;
        &gt;&lt;/TableLayout&gt;

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