error with mainactivity.java
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/8498869/r-cannot-be-resolved-to-a-variable-hello-world">R cannot be resolved to a variable - Hello World</a>  </p>
</blockquote>



<p>I was developing my first app but get stuck on <code>mainactivity.java</code>.</p>

<p>Here is my code: </p>

<pre><code>package com.nterface;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    /** Called when the user clicks the Send button */
    public void sendMessage(View view) {
        // Do something in response to button
    }

}
</code></pre>

<p>An error occurs on line <code>setContentView(R.layout.activity_main);</code></p>

<p>Multiple markers at this line:</p>

<ul>
<li>R cannot be resolved to a variable</li>
<li>Line breakpoint:MainActivity [line: 12]- 
onCreate(Bundle)</li>
</ul>
