title: R cannot be resolved to a variable - Hello World
body: <p>I know many people have had this problem and I have searched Google/Stack Overflow, but I somehow still can't figure out what I'm doing wrong.</p>
  
  <pre><code>package HelloWorld;
  import android.app.Activity;
  import android.os.Bundle;    
  import android.widget.TextView;
  
  public class HelloWorldActivity extends Activity {
      /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
   //   TextView tv = new TextView(this);
   //   String hello = "Hello World!";
   //   tv.setText(hello);
   //   setContentView(tv);
  }
  }
  </code></pre>
  
  <p>I tried searching for unnecessary <code>import android.R;</code> statements, as well as building/cleaning/refreshing/etc, but I just can't seem to figure it out. Maybe it's a problem with the way I've installed my SDKs? I don't think there is, but I'm very new to this so it's likely I made a blunder somewhere.</p>
  
  <p>Also, I am getting this error:</p>
  
  <p><code>[2011-12-13 18:18:46 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for C:\Users\MYNAME\Android Development\Hello World\Hello World\AndroidManifest.xml: The processing instruction target matching "[xX][mM][lL]" is not allowed.</code></p>
  
  <p>Can anyone help me? Thanks!</p>
  
  <p><strong>EDIT:</strong> My XML file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="HelloWorld Mylove"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk android:minSdkVersion="10" /&gt;
  
      &lt;application
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name" &gt;
          &lt;activity
              android:name=".HelloWorldActivity"
              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>