title: Java cannot find symbol when implementing Android Activity
body: <p>I'm writing my first android application and having some trouble. Consider the following code:</p>
  
  <pre class="lang-java prettyprint-override"><code>@SuppressLint("NewApi")
  @Override
  protected void onCreate(Bundle savedInstanceState{
      super.onCreate(savedInstanceState);
      TextView textView;
      textView = new TextView(this);
      textView.setTextSize(40);
      //textView.setText("TEST");
      setContentView(textView);
  }
  </code></pre>
  
  <p>This code compiles as long as the <code>setText</code> line stays commented. If i uncomment it, i get the following error: <code>cannot find symbol: variable textView</code></p>
  
  <p>Am i doing something obviously wrong here? I'm new to android and it's been years since I wrote any java (I write a lot more C and my instincts tend to lead me astray...)</p>
  
  <p>Edit:</p>
  
  <p>This function is a simplification of the example code here:
  <a href="http://developer.android.com/training/basics/firstapp/starting-activity.html" rel="nofollow">http://developer.android.com/training/basics/firstapp/starting-activity.html</a></p>
  
  <p>Is this example wrong? It doesn't look like i should have to create such a simple view in the manifest, this looks like a java linker error to me? I appreciate your responses, but I'm still having trouble understanding what's wrong.</p>