title: android setContentView not working
body: <p>Not a duplicate: my question is simpler than all of the others.</p>
  
  <p>I've been trying to follow the <a href="http://developer.android.com/resources/tutorials/hello-world.html" rel="nofollow">android hello world tutorial</a>, and I can't get the very first example to work.</p>
  
  <p>This is my code: </p>
  
  <pre><code>package com.example.helloandroid;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.widget.TextView;
  
  public class HelloAndroid extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          TextView tv = new TextView(this);
          tv.setText("Hello, Android");
          setContentView(tv);
      }
  }
  </code></pre>
  
  <p>As you can see, I copied and pasted directly out of the tutorial.
  The problem is, that instead of displaying Hello, Android, it displays whatever is in the layout/main.xml file. If that file doesn't exist, it closes without displaying anything.</p>
  
  <p>WHY IS THIS NOT WORKING?</p>
  
  <p>As I've copied this directly from the official docs, I have no idea where to even start trying to debug it. Any pointers or suggestions you can give will be greatly appreciated!</p>
  
  <p>Edit: posting my main.xml as requested</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      &gt;
  &lt;TextView
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:text="Hello World, HelloAndroid"
      /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Note that this was created automatically when I started the project, I didn't put it there.</p>