title: R cannot be resolved
body: <pre><code>package com.ustr.eMIRnew;
  
  import java.util.ArrayList;
  import java.util.HashMap;
  import android.R;
  import android.app.Activity;
  import android.os.Bundle;
  import android.widget.ListView;
  import android.widget.SimpleAdapter;
  
  public class eMIRnew extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
      }
  }`
  </code></pre>
  
  <p>This is my code. But it is showing the error <code>R cannot be resolved</code>.<br>
  I have tried many methods like clean-and-build, closed-and-open the project, changed <code>import android.R</code> to <code>import your.package.name.R</code> etc. But nothing helped. Can anybody help me, please?</p>