title: textView.setText(); crashes
body: <p>The setText() method returns null in my application why?</p>
  
  <pre><code>public class GetValue extends Activity {
      char letter = 'g';
      int ascii = letter;
  
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          TextView textView = (TextView)findViewById(R.id.txt_1);
              textView.setText(ascii);
      }
  }
  </code></pre>
  
  <p>It doesn't matter what text i put in, it crashes anyway. Why does setText() keep returning null?</p>
  
  <p>Thank you, in advance</p>
  
  <p><strong>Solution:</strong> My error was in the xml file. I wrote:
  android:text="@+id/txt_1"
  When it should say:
  android:id="@+id/txt_1"</p>
  
  <p>Thanks a lot for all the answers and comments!</p>