title: Android: The Application XXXXX (process com.ough.XXXXX) has stopped unexpectedly . please try again
body: <p>I am new to android development, 
  I tried to run my first app with eclipse, and the emulator gives me an error :</p>
  
  <blockquote>
    <p>The Application XXXXX (process com.ough.XXXXX) has stopped unexpectedly . please try again.</p>
  </blockquote>
  
  <p>I tried to seek for an answer in the web, but it seems not helping me much.
  maybe I set the emulator wrong ?  or my code isnt any good?</p>
  
  <p>my emulator set to :
  4.0" WVGA , android 2.2 api level 8  (I tried different stuff and it wont work as well..)</p>
  
  <p>my code is :</p>
  
  <pre><code>int counter;
  Button add;
  Button sub;
  TextView display;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      counter = 0;
      add = (Button) findViewById(R.id.bAdd);
      sub = (Button) findViewById(R.id.bSub);
      display = (TextView) findViewById(R.id.tvDisplay);
  
      add.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              counter++;
              display.setText("Your total is " + counter);
          }
      });
  
      sub.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              counter--;
              display.setText("Your total is " + counter);
          }
      });
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  </code></pre>
  
  <p>my androidManifest.xml :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="17" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name="com.ough.thenewboston.MainActivity"
          android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>LOGCAT :</strong> </p>
  
  <pre><code>    03-19 13:31:19.014: E/Zygote(32): setreuid() failed. errno: 2
  03-19 13:31:24.084: E/Zygote(32): setreuid() failed. errno: 17
  03-19 13:31:24.844: E/BatteryService(58): usbOnlinePath not found
  03-19 13:31:24.844: E/BatteryService(58): batteryVoltagePath not found
  03-19 13:31:24.844: E/BatteryService(58): batteryTemperaturePath not found
  03-19 13:31:24.854: E/SurfaceFlinger(58): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
  03-19 13:31:28.244: E/EventHub(58): could not get driver version for /dev/input/mouse0, Not a typewriter
  03-19 13:31:28.244: E/EventHub(58): could not get driver version for /dev/input/mice, Not a typewriter
  03-19 13:31:28.914: E/System(58): Failure starting core service
  03-19 13:31:28.914: E/System(58): java.lang.SecurityException
  03-19 13:31:28.914: E/System(58):   at android.os.BinderProxy.transact(Native Method)
  03-19 13:31:28.914: E/System(58):   at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
  03-19 13:31:28.914: E/System(58):   at android.os.ServiceManager.addService(ServiceManager.java:72)
  03-19 13:31:28.914: E/System(58):   at com.android.server.ServerThread.run(SystemServer.java:184)
  03-19 13:31:29.334: E/SoundPool(58): error loading /system/media/audio/ui/Effect_Tick.ogg
  03-19 13:31:29.334: E/SoundPool(58): error loading /system/media/audio/ui/KeypressStandard.ogg
  03-19 13:31:29.334: E/SoundPool(58): error loading /system/media/audio/ui/KeypressSpacebar.ogg
  03-19 13:31:29.334: E/SoundPool(58): error loading /system/media/audio/ui/KeypressDelete.ogg
  03-19 13:31:29.334: E/SoundPool(58): error loading /system/media/audio/ui/KeypressReturn.ogg
  03-19 13:31:30.024: E/ThrottleService(58): Could not open GPS configuration file /etc/gps.conf
  03-19 13:31:30.464: E/logwrapper(131): executing /system/bin/tc failed: No such file or directory
  03-19 13:31:30.504: E/logwrapper(133): executing /system/bin/tc failed: No such file or directory
  03-19 13:31:30.574: E/logwrapper(136): executing /system/bin/tc failed: No such file or directory
  03-19 13:31:35.136: E/HierarchicalStateMachine(58): TetherMaster - unhandledMessage: msg.what=3
  </code></pre>
  
  <p>one other thing that is it strange :
  it goes "locked" every time when i start the application.  when I open it from the lock mode, it gives me the "sorry.." error line..</p>
  
  <p>any thoughts ?</p>