Android R cannot be resolved to a variable
<p>Could someone please figure out why I am getting the R is is not resolved to a variable error. I looked at other questions similar to the one I am asking now but I could not find any solution that worked for me.</p>

<h2>Main Activity</h2>

<pre><code>package com.example.stressanalysis;


import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Spinner;

public class main_activity extends Activity {
    private static final int CAMERA_REQUEST = 1888;
    ImageView imageView;
    Button button1;
    Spinner spinner1;
    int angle;
    float x,y;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        imageView = (ImageView) this.findViewById(R.id.imageView1);
        button1 = (Button) this.findViewById(R.id.button1);
        spinner1=(Spinner) findViewById(R.id.spinner1);
        ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(
                this, R.array.spinnerArray, android.R.layout.simple_spinner_item);adapter.setDropDownViewResource(
                        android.R.layout.simple_spinner_dropdown_item);
                spinner1.setAdapter(adapter);
                spinner1.setOnItemSelectedListener(new MyOnItemSelectedListener());
        button1.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                Intent cameraIntent = new Intent(
                        android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
                startActivityForResult(cameraIntent, CAMERA_REQUEST);
            }
        });
    }
    public class MyOnItemSelectedListener implements OnItemSelectedListener{
        @Override
        public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int pos, long id)
        {
            String str=parent.getItemAtPosition(pos).toString().toUpperCase();
            angle=Integer.parseInt(str);
        }
        public void onNothingSelected(AdapterView parent)
        {
            //Do Nothing
        }

    }
    public boolean onTouch(View v, MotionEvent event) {
        x = event.getX();
        y = event.getY();
        return true;
    }

    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (requestCode == CAMERA_REQUEST &amp;&amp; resultCode == RESULT_OK) {
            Bitmap photo = Bitmap.createBitmap((Bitmap) data.getExtras().get("data"));
            Bitmap mutableBitmap = photo.copy(Bitmap.Config.ARGB_8888, true);
            Paint paint = new Paint();
            Point point = new Point();
            imageView.setImageBitmap(photo);
            Canvas canvas = new Canvas(mutableBitmap);
            int rectWidth = 15;
            int rectHeight = 15;
            point.set((int)x, (int) y);
            Rect r =new Rect((point.x - rectWidth / 2), (point.y - rectHeight / 2),(point.x + rectWidth / 2),(point.y + rectHeight / 2));
            canvas.save();
            canvas.rotate(45);//Angle of rotation
            canvas.drawRect(r,paint);
            canvas.restore();


        }
    }

}
</code></pre>

<h2>Main XML</h2>

<pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".main_activity" &gt;

    &lt;Spinner
        android:id="@+id/spinner1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="22dp" /&gt;

    &lt;ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/spinner1"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="32dp"
        android:src="@drawable/ic_launcher" /&gt;

    &lt;Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="37dp"
        android:text="Button" /&gt;

&lt;/RelativeLayout&gt;
</code></pre>

<h2>Strings.xml</h2>

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

    &lt;string name="app_name" formatted="false"&gt;StressAnalysis&lt;/string&gt;
    &lt;string name="hello_world"&gt;Hello world!&lt;/string&gt;
    &lt;string name="menu_settings"&gt;Settings&lt;/string&gt;
    &lt;string name= "spinnerPrompt"&gt;SpinnerTest&lt;/string&gt;
    &lt;string-array name="spinnerArray"&gt;
        &lt;item&gt; 10 &lt;/item&gt;
        &lt;item&gt; 15 &lt;/item&gt;
        &lt;item&gt; 20 &lt;/item&gt;
        &lt;item&gt; 25 &lt;/item&gt;
        &lt;item&gt; 30 &lt;/item&gt;
        &lt;item&gt; 35 &lt;/item&gt;
        &lt;item&gt; 40 &lt;/item&gt;
        &lt;item&gt; 45 &lt;/item&gt;
        &lt;item&gt; 50 &lt;/item&gt;
        &lt;item&gt; 55 &lt;/item&gt;
        &lt;item&gt; 60 &lt;/item&gt;
        &lt;item&gt; 65 &lt;/item&gt;
        &lt;item&gt; 70 &lt;/item&gt;
        &lt;item&gt; 75 &lt;/item&gt;
        &lt;item&gt; 80 &lt;/item&gt;
        &lt;item&gt; 85 &lt;/item&gt;
        &lt;item&gt; 90 &lt;/item&gt;
    &lt;/string-array&gt;

&lt;/resources&gt;
</code></pre>

<h2>Manifest</h2>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.stressanalysis"
    android:versionCode="1"
    android:versionName="1.0" &gt;

    &lt;uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" /&gt;

    &lt;application

        android:allowBackup="true"
        android:debuggable="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" &gt;

        &lt;activity
            android:name="com.example.stressanalysis.main_activity"

            android:label="@string/app_name" &gt;
            &lt;intent-filter&gt;

                &lt;action android:name="android.intent.action.MAIN" /&gt;

                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
    &lt;/application&gt;

&lt;/manifest&gt;
</code></pre>

<h2>Console Error</h2>

<pre><code>[2013-03-13 18:09:27 - StressAnalysis] W/ResourceType( 7176): Bad XML block: header size 114 or total size 99 is larger than data size 0
[2013-03-13 18:09:27 - StressAnalysis] F:\Java Programs\StressAnalysis\res\menu\main.xml:3: error: Error: No resource found that matches the given name (at 'title' with value '@string/action_settings').
[2013-03-13 19:19:32 - StressAnalysis] W/ResourceType( 7716): Bad XML block: header size 114 or total size 99 is larger than data size 0
[2013-03-13 19:19:32 - StressAnalysis] F:\Java Programs\StressAnalysis\res\menu\main.xml:3: error: Error: No resource found that matches the given name (at 'title' with value '@string/action_settings').
</code></pre>
