title: "Cannot be resolved or is not a field"
body: <p>I've been having this problem since I tried android programming(newbie here). Recently started Android Programming 2 weeks ago.
  Testing this out(<a href="http://startandroid.ru/en/lessons/complete-list/225-lesson-19-creating-a-simple-calculator.html" rel="nofollow">http://startandroid.ru/en/lessons/complete-list/225-lesson-19-creating-a-simple-calculator.html</a>)
   and got problems on the part with R.id sample: R.id.etNum1</p>
  
  <p>"etNum1 cannot be resolved or is not a field"</p>
  
  <p>Here's my code:</p>
  
  <pre><code>    etNum1 = (EditText) findViewById(R.id.etNum1);
      etNum2 = (EditText) findViewById(R.id.etNum2);
  
      btnAdd = (Button) findViewById(R.id.btnAdd);
      btnSub = (Button) findViewById(R.id.btnSub);
      btnMult = (Button) findViewById(R.id.btnMult);
      btnDiv = (Button) findViewById(R.id.btnDiv);
  </code></pre>
  
  <p>XML for the buttons and text:</p>
  
  <pre><code>&lt;EditText
      android:id="@+id/etNum1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:ems="10" &gt;
  
      &lt;requestFocus /&gt;
  &lt;/EditText&gt;
  
  &lt;EditText
      android:id="@+id/etNum2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignLeft="@+id/editText1"
      android:layout_below="@+id/editText1"
      android:ems="10" /&gt;
  
  &lt;Button
      android:id="@+id/btnSub"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignBaseline="@+id/button1"
      android:layout_alignBottom="@+id/button1"
      android:layout_toRightOf="@+id/button1"
      android:text="Subtract" /&gt;
  
  &lt;Button
      android:id="@+id/btnMult"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignBaseline="@+id/button2"
      android:layout_alignBottom="@+id/button2"
      android:layout_toRightOf="@+id/button2"
      android:text="Multiply" /&gt;
  
  &lt;Button
      android:id="@+id/btnDiv"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignBaseline="@+id/button3"
      android:layout_alignBottom="@+id/button3"
      android:layout_alignParentRight="true"
      android:text="Divide" /&gt;
  
  &lt;Button
      android:id="@+id/btnAdd"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_below="@+id/editText2"
      android:layout_marginLeft="36dp"
      android:text="Add" /&gt;
  
  &lt;TextView
      android:id="@+id/tvResult"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_below="@+id/button2"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="14dp"
      android:text="Answer"
      android:textAppearance="?android:attr/textAppearanceLarge" /&gt;
  </code></pre>