title: Emulator keeps crashing
body: <p>Why do I keep getting this error: when I click the START button on menu, it is supposed to draw the game background but instead the emulator says UNFORTUNATELY, APP HAS STOPPED.</p>
  
  <p>HERE is the LogCat:</p>
  
  <pre><code>12-20 15:52:35.440: D/dalvikvm(941): Not late-enabling CheckJNI (already on) 
  12-20 15:52:37.380: D/dalvikvm(941): GC_FOR_ALLOC freed 54K, 4% free 3158K/3288K, paused 29ms, total 30ms
  12-20 15:52:37.530: D/gralloc_goldfish(941): Emulator without GPU emulation detected.
  12-20 15:51:47.789: D/dalvikvm(941): GC_FOR_ALLOC freed 44K, 4% free 3625K/3744K, paused 53ms, total 58ms
  12-20 15:51:47.859: D/AndroidRuntime(941): Shutting down VM
  12-20 15:51:47.859: W/dalvikvm(941): threadid=1: thread exiting with uncaught exception (group=0xb3a95b90)
  12-20 15:51:47.889: E/AndroidRuntime(941): FATAL EXCEPTION: main
  12-20 15:51:47.889: E/AndroidRuntime(941): Process: com.jfdimarzio, PID: 941 
  12-20 15:51:47.889: E/AndroidRuntime(941): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jfdimarzio/com.jfdimarzio.PBGame}: java.lang.NullPointerException
  12-20 15:51:47.889: E/AndroidRuntime(941):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2176)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at android.app.ActivityThread.access$700(ActivityThread.java:135)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at android.os.Handler.dispatchMessage(Handler.java:102)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at android.os.Looper.loop(Looper.java:137)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at android.app.ActivityThread.main(ActivityThread.java:4998)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at java.lang.reflect.Method.invokeNative(Native Method) 
  12-20 15:51:47.889: E/AndroidRuntime(941):  at java.lang.reflect.Method.invoke(Method.java:515)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at dalvik.system.NativeStart.main(Native Method) 
  12-20 15:51:47.889: E/AndroidRuntime(941): Caused by: java.lang.NullPointerException
  12-20 15:51:47.889: E/AndroidRuntime(941):  at android.view.ViewGroup.addViewInner(ViewGroup.java:3561)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at android.view.ViewGroup.addView(ViewGroup.java:3415)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at android.view.ViewGroup.addView(ViewGroup.java:3391)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:309)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:299)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at android.app.Activity.setContentView(Activity.java:1948)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at com.jfdimarzio.PBGame.onCreate(PBGame.java:14)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at android.app.Activity.performCreate(Activity.java:5243)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
  12-20 15:51:47.889: E/AndroidRuntime(941):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
  12-20 15:51:47.889: E/AndroidRuntime(941):  ... 11 more 
  12-20 15:51:53.249: I/Process(941): Sending signal. PID: 941 SIG: 9
  </code></pre>
  
  <p>Here is the PBGame.java. Can you help me solve the NullPointerException? (PBGame is a new activity)</p>
  
  <pre><code>import android.app.Activity;
  import android.os.Bundle;
  
  public class PBGame extends Activity {
      final PBGameVars gameEngine = new PBGameVars();
      private PBGameView gameView;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(gameView);
      }
  
      @Override
      protected void onResume() {
          super.onResume();
          gameView.onResume();
      }
  
      @Override
      protected void onPause() {
          super.onPause();
          gameView.onPause();
      }
  
  }
  </code></pre>