title: Webview not initializing
body: <p>When ever I try to use a web view it gives me a null pointer exception, my code:</p>
  
  <pre><code>import android.app.Activity;
  import android.os.Bundle;
  import android.webkit.WebChromeClient;
  import android.webkit.WebView;
  
  public class Main extends Activity {
      WebView webView;
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          webView = (WebView)findViewById(R.id.webView);
          webView.getSettings().setJavaScriptEnabled(true);
          webView.setWebChromeClient(new WebChromeClient());
          webView.loadUrl("file:///android_asset/www/index.html");
      }
  }
  </code></pre>
  
  <p>the Logs are:</p>
  
  <p>02-18 22:08:06.224: ERROR/AndroidRuntime(355): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.web/com.test.web.Main}: java.lang.NullPointerException
  02-18 22:08:06.224: ERROR/AndroidRuntime(355): Caused by: java.lang.NullPointerException
  02-18 22:08:06.224: ERROR/AndroidRuntime(355):     at com.test.web.Main.onCreate(Main.java:17)</p>
  
  <p>(there where more logs just none of them pertained to the problem)</p>
  
  <p>On a semi- related note how do you make code look like code on stackexchange?</p>
  
  <p>So I'm guessing the webView isn't initializing correctly?</p>